zoukankan      html  css  js  c++  java
  • bootstrap-----流体布局解析

    流体布局容器
    容器的width为auto,只是两边加了15px的padding。

    流体布局容器
            容器的width为auto,只是两边加了15px的padding。

    <div class="container-fluid">
    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <link rel="stylesheet" href="css/bootstrap.min.css" />
            <style type="text/css">
                .container-fluid{
                    border: 1px solid;
                    height: 30px;
                    background: pink;
                }
            </style>
        </head>
        <body>
            <!--流体容器   自适应-->
            <div class="container-fluid">
                container-fluid
            </div>
        </body>
        <script src="js/jquery.min.js"></script>
        <script src="js/bootstrap.min.js"></script>
    </html>
    container-fluid

    源码刨析

    .container {
      .container-fixed();
                 最小   sm=平板=800     //768px
      @media (min- @screen-sm-min) {
         @container-sm;
      }         最小   md=中屏pc=1024   //992px;
      @media (min- @screen-md-min) {
         @container-md;
      }             最小 lg=大屏pc=1232  //1200px;
      @media (min- @screen-lg-min) {
         @container-lg;
      }
    }
    .container-fluid {
      .container-fixed();
    }
    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8">
            <title></title>
            <link rel="stylesheet" href="css/bootstrap.min.css" />
            <style type="text/css">
                .container-fluid{
                    border: 1px solid;
                    
                    background: pink;
                }
            </style>
        </head>
        <body>
            <!--流体容器   自适应-->
            <div class="container-fluid">
            魏子钧 赵凡迪 刘岳 谷文 程爱华 郑硕石 赵佟 张强 蔡跃升 郁振一)        魏子钧 赵凡迪 刘岳 谷文 程爱华 郑硕石 赵佟 张强 蔡跃升 郁振一)        魏子钧 赵凡迪 刘岳 谷文 程爱华 郑硕石 赵佟 张强 蔡跃升 郁振一)        魏子钧 赵凡迪 刘岳 谷文 程爱华 郑硕石 赵佟 张强 蔡跃升 郁振一)        魏子钧 赵凡迪 刘岳 谷文 程爱华 郑硕石 赵佟 张强 蔡跃升 郁振一)        魏子钧 赵凡迪 刘岳 谷文 程爱华 郑硕石 赵佟 张强 蔡跃升 郁振一)        魏子钧 赵凡迪 刘岳 谷文 程爱华 郑硕石 赵佟 张强 蔡跃升 郁振一)        魏子钧 赵凡迪 刘岳 谷文 程爱华 郑硕石 赵佟 张强 蔡跃升 郁振一)        魏子钧 赵凡迪 刘岳 谷文 程爱华 郑硕石 赵佟 张强 蔡跃升 郁振一)
    
            </div>
        </body>
        <script src="js/jquery.min.js"></script>
        <script src="js/bootstrap.min.js"></script>
    </html>
    container-fluid
  • 相关阅读:
    【POJ】2778 DNA Sequence(AC自动机+矩阵快速幂)
    【HDU】4352 XHXJ's LIS(数位dp+状压)
    【BZOJ】1756: Vijos1083 小白逛公园(线段树)
    【POJ】1062 昂贵的聘礼 (最短路)
    【Codeforces】Codeforces Round #491 (Div. 2) (Contest 991)
    【Codeforces】Codeforces Round #492 (Div. 2) (Contest 996)
    【Codeforces】Educational Codeforces Round 46(Contest 1000)
    【POJ】1935 Journey(树形dp)
    【UVALive】4094 WonderTeam(神结论)
    【POJ】1185 炮兵阵地(状压dp)
  • 原文地址:https://www.cnblogs.com/hack-ing/p/11811338.html
Copyright © 2011-2022 走看看