码迷,mamicode.com
首页 > 其他好文 > 详细

bootstarp栅格系统

时间:2016-11-20 13:25:48      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:cal   file   char   containe   primary   bootstrap   initial   name   charset   

<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <style>
      .container{
        border: 1px solid #ccc;
      }
    </style>
  </head>
  <body>
<!-- 从堆叠到水平排列 -->
  <div class="container">
    <div class="row">
      <div class="col-xs-1">col-xs-1</div>
      <div class="col-xs-1">col-xs-1</div>
      <div class="col-xs-1">col-xs-1</div>
      <div class="col-xs-1">col-xs-1</div>
      <div class="col-xs-1">col-xs-1</div>
      <div class="col-xs-1">col-xs-1</div>
      <div class="col-xs-1">col-xs-1</div>
      <div class="col-xs-1">col-xs-1</div>
      <div class="col-xs-1">col-xs-1</div>
      <div class="col-xs-1">col-xs-1</div>
      <div class="col-xs-1">col-xs-1</div>
      <div class="col-xs-1">col-xs-1</div>
    </div>
  </div>
  <div class="container">
      <div class="row">
        <div class="col-xs-8">col-xs-8</div>
        <div class="col-xs-4">col-xs-4</div>
      </div>
      <div class="row">
        <div class="col-xs-4">col-xs-4</div>
        <div class="col-xs-4">col-xs-4</div>
        <div class="col-xs-4">col-xs-4</div>
      </div>
  </div>

<!-- 列偏移 -->
  <div class="container">
    <div class="row">
      <div class="col-xs-3 col-xs-offset-3 bg-info" >col-xs-3</div>
      <div class="col-xs-3 col-xs-offset-3 bg-info">col-xs-3</div>
    </div>
  </div>

<br>
<!-- 嵌套列 -->
      <div class="row">
        <div class="col-sm-8 bg-primary">col-xs-8</div> 
        <div class="row">
          <div class="col-xs-4 col-sm-6 bg-success" >col-xs-4</div> 
          <div class="col-xs-8 col-sm-6 bg-info">col-xs-4</div> 
        </div>      
  </div>
  <br>
<!-- 列排序 -->
  <div class="row">
    <div class="col-md-9 col-md-push-3 bg-warning">col-md-9 col-md-push-3</div>
    <div class="col-md-3 col-md-pull-9 bg-danger">col-md-3 col-md-pull-9</div>
  </div>

<br>
    <!-- jQuery (necessary for Bootstrap‘s JavaScript plugins) -->
    <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>

  

bootstarp栅格系统

标签:cal   file   char   containe   primary   bootstrap   initial   name   charset   

原文地址:http://www.cnblogs.com/xiaoyumi666/p/6082305.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!