1. 主页
  2. 文档
  3. 响应式布局
  4. 实现栅格系统–扩展部分

实现栅格系统–扩展部分

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>3.2 实现栅格系统--扩展部分</title>
    <style>
        * {
            box-sizing: border-box;
            padding: 0;
            margin: 0;
        }

        img {
            width: 100%;
        }

        body {
            padding-top: 100px;
        }

        .container {
            background-color: #eee;
        }
    </style>
    <link rel="stylesheet" href="css/grid.css">
</head>
<body>
    <div class="container">
        <!-- <div class="row">
            <div class="col-md-4">
                <img src="img/2-1.jpg" alt="cellphone">
            </div>
            <div class="col-md-4">
                <img src="img/2-2.jpg" alt="cellphone">
            </div>
            <div class="col-md-4">
                <img src="img/2-3.jpg" alt="cellphone">
            </div>
        </div> -->

        <!-- <div class="row">
            <div class="col-md-5">
                <img src="img/2-1.jpg" alt="cellphone">
            </div>
            <div class="col-md-5">
                <img src="img/2-2.jpg" alt="cellphone">
            </div>
            <div class="col-md-5">
                <img src="img/2-3.jpg" alt="cellphone">
            </div>
        </div> -->

        <!-- <div class="row">
            <div class="col-md-4">
                <img src="img/2-1.jpg" alt="cellphone">
            </div>
            <div class="col-md-4">
                <img src="img/2-2.jpg" alt="cellphone">
            </div>
        </div> -->

        <!-- <div class="row">
            <div class="col-md-4">
                <img src="img/2-1.jpg" alt="cellphone">
            </div>
            <div class="col-md-4 col-md-offset-4 col-lg-offset-0">
                <img src="img/2-2.jpg" alt="cellphone">
            </div>
        </div> -->

        <!-- <div class="row">
            <div class="col-md-4 col-md-push-4 col-lg-push-0">
                <img src="img/2-1.jpg" alt="cellphone">
            </div>
            <div class="col-md-4 col-md-pull-4 col-lg-pull-0">
                <img src="img/2-2.jpg" alt="cellphone">
            </div>
        </div> -->

        <!-- <div class="row">
            <div class="col-md-4">
                <img src="img/2-1.jpg" alt="cellphone">
            </div>
            <div class="col-md-4">
                <img src="img/2-2.jpg" alt="cellphone">
            </div>
            <div class="col-md-4 d-none d-md-block">
                <img src="img/2-3.jpg" alt="cellphone">
            </div>
        </div> -->

        <div class="row">
            <div class="col-md-4">
                <img src="img/2-1.jpg" alt="cellphone">
            </div>
            <div class="col-md-4">
                <img src="img/2-2.jpg" alt="cellphone">
            </div>
            <div class="col-md-4 d-md-none">
                <img src="img/2-3.jpg" alt="cellphone">
            </div>
        </div>

    </div>
</body>
</html>

========================================

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>5.2 实现栅格系统--扩展部分</title>
    <style>
        * {
            box-sizing: border-box;
            padding: 0;
            margin: 0;
        }

        img {
            width: 100%;
        }

        body {
            padding-top: 100px;
        }

        .container {
            background-color: #eee;
        }
    </style>
    <link rel="stylesheet" href="css/grid-flex.css">
</head>
<body>
    <div class="container">
        <!-- <div class="row">
            <div class="col-md-4">
                <img src="img/2-1.jpg" alt="cellphone">
            </div>
            <div class="col-md-4 col-md-offset-4">
                <img src="img/2-2.jpg" alt="cellphone">
            </div>
        </div> -->

        <!-- <div class="row">
            <div class="col-md-4 col-md-order-last">
                <img src="img/2-1.jpg" alt="cellphone">
            </div>
            <div class="col-md-4 col-md-order-first">
                <img src="img/2-2.jpg" alt="cellphone">
            </div>
        </div> -->

        <div class="row">
            <div class="col-md-4">
                <img src="img/2-1.jpg" alt="cellphone">
            </div>
            <div class="col-md-4">
                <img src="img/2-2.jpg" alt="cellphone">
            </div>
            <div class="col-md-4 d-none d-md-block">
                <img src="img/2-3.jpg" alt="cellphone">
            </div>
        </div>

        <!-- <div class="row">
            <div class="col-md-4">
                <img src="img/2-1.jpg" alt="cellphone">
            </div>
            <div class="col-md-4">
                <img src="img/2-2.jpg" alt="cellphone">
            </div>
            <div class="col-md-4 d-md-none">
                <img src="img/2-3.jpg" alt="cellphone">
            </div>
        </div> -->

    </div>
</body>
</html>
这篇文章对您有用吗?

我们要如何帮助您?