Bootstrap 网格堆叠到水平网格


你可以尝试运行以下代码,在 Bootstrap 中创建一个堆叠到水平网格的网格 −

示例

在线演示

<!DOCTYPE html>
<html>
   <head>
      <title>Bootstrap Example</title>
      <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet">
      <script src = "/scripts/jquery.min.js"></script>
      <script src = "/bootstrap/js/bootstrap.min.js"></script>
   </head>
   <body>
      <div class = "container">
         <h1>Grid</h1>
         <div class = "row">
            <div class = "col-sm-6" style = "background-color:blue; color: white">
               This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.
            </div>
            <div class = "col-sm-6" style = "background-color:red; color: white">
               This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text.
            </div>
         </div>
      </div>
   </body>
</html>

更新时间:12-Jun-2020

181 次浏览

开启你的 事业

完成课程获得认证

开始
广告