zoukankan      html  css  js  c++  java
  • Bootstrap学习笔记(1)栅格系统

    栅格系统:

    .row 1行12列

    .col-md-3 占3列,一行就是4个

     1 <!DOCTYPE html>
     2 <html lang="en">
     3 <head>
     4     <meta charset="UTF-8">
     5     <meta name="viewport" content="width=device-width,initial-scale=1">
     6     <title>Document</title>
     7     <link rel="stylesheet" href="../bs/css/bootstrap.css">
     8     <link rel="stylesheet" href="../bs/css/bootstrap-theme.css">
     9     <script src="..bs/js/jquery.js"></script>
    10     <script src="..bs/js/bootstrap.js"></script>
    11     <style>
    12         .container{
    13             background:green;
    14             height:300px;
    15         }
    16         /*栅格必须放到container和row里面!*/
    17         .row{
    18             margin-bottom:15px;
    19         }
    20     </style>
    21     
    22 </head>
    23 <body>
    24     <div class="container">
    25         <h1>Bootstrap栅格</h1>
    26         <div class="row">
    27             <div class="col-md-3">
    28                 <img src="../image/1.jpg" alt="" width="100%">
    29             </div>
    30             <!-- col-md-fooset-3是偏移,如果同一行还有图片,就挤到下面了! -->
    31             <div class="col-md-3 col-md-offset-3">
    32                 <img src="../image/1.jpg" alt="" width="100%">
    33             </div>
    34             <div class="col-md-3">
    35                 <img src="../image/1.jpg" alt="" width="100%">
    36             </div>
    37             
    38         </div>
    39         <div class="row">
    40             <div class="col-md-3">
    41                 <img src="../image/1.jpg" alt="" width="100%">
    42             </div>
    43             <div class="col-md-3">
    44                 <img src="../image/1.jpg" alt="" width="100%">
    45             </div>
    46             <div class="col-md-3">
    47                 <img src="../image/1.jpg" alt="" width="100%">
    48             </div>
    49             <div class="col-md-3">
    50                 <img src="../image/1.jpg" alt="" width="100%">
    51             </div>
    52         </div>
    53         <div class="row">
    54             <div class="col-md-3">
    55                 <img src="../image/1.jpg" alt="" width="100%">
    56             </div>
    57             <div class="col-md-3">
    58                 <img src="../image/1.jpg" alt="" width="100%">
    59             </div>
    60             <div class="col-md-3">
    61                 <img src="../image/1.jpg" alt="" width="100%">
    62             </div>
    63             <div class="col-md-3">
    64                 <img src="../image/1.jpg" alt="" width="100%">
    65             </div>
    66         </div>
    67     </div>
    68 </body>
    69 </html>
  • 相关阅读:
    RUNOOB.COM-python网络编程-(python3.5.0)
    windows查看服务
    计算机网络里的一些理解
    如果面试有傻逼问道oracle怎么启动的
    推荐一个学习数据库的地方
    电脑中的驱动程序是什么,是干什么的
    Raspberry Pi 4B 之 Python开发
    Ubuntu20.04+EdgexFoundry边缘计算微服务搭建-----遇到的问题-----make build 被墙问题
    Raspberry Pi 4B + Ubuntu 20.04 server for arm64 的wifi配置
    关于PicoNeo开发环境的Unity3D+AndroidSDK配置
  • 原文地址:https://www.cnblogs.com/Jacklovely/p/6114398.html
Copyright © 2011-2022 走看看