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>

最后更新时间:20-06-12

181 次浏览

开启你的 职业

完成此课程即可获得认证

开始
广告