首页 >web前端 >css教程 >Bootstrap栅格布局的列偏移实例

Bootstrap栅格布局的列偏移实例

无忌哥哥
无忌哥哥原创
2018-06-28 16:43:002421浏览

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="dist/css/bootstrap.css">
    <script src="jquery-3.2.1.js"></script>
    <script src="dist/js/bootstrap.js"></script>
    <title>栅格布局的列偏移</title>
    <style>
        .grid {
            border: 1px solid #696969;
            border-radius: 5px;
            background-color: lightskyblue;
            min-height: 30px;
            text-align: center;
            line-height: 30px;
        }
        .green {
            background-color: lightgreen;
        }
        .pink {
            background-color: lightpink;
        }
    </style>
</head>
<body>
<div>
    <div>
        <div class="col-md-4 grid">.col-md-4</div>
        <div class="col-md-4 col-md-offset-4 grid">.col-md-4 .col-md-offset-4</div>
    </div>
    <div>
        <div class="col-md-3 col-md-offset-3 grid">.col-md-3 .col-md-offset-3</div>
        <div class="col-md-3 col-md-offset-3 grid">.col-md-3 .col-md-offset-3</div>
    </div>
    <div>
        <div class="col-md-6 col-md-offset-3 grid">.col-md-6 .col-md-offset-3</div>
    </div>
</div>
</body>
</html>

以上是Bootstrap栅格布局的列偏移实例的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn