• HTML网格


    html文件

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="style.css" type="text/css">
    <title>Document</title>
    </head>
    <body>
    <div class="wrapper">
    <div class="one" style="background:rgb(160, 160, 238)">
    <center>
    <big>one</big>
    </center>
    </div>
    <div class="two" style="background:pink">
    two
    </div>
    <div class="three" style="background:rgb(255, 170, 202)">
    three
    </div>
    <div class="fuor" style="background:rgb(0, 145, 198)">
    four
    </div>
    <div class="five" style="background:rgb(238, 198, 93)">
    five
    </div>
    <div class="six" style="background:rgb(155, 216, 250)">
    six
    </div>
    </div>
    </body>
    </html>

    style.css文件

    .wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 5px;
    grid-auto-rows: minmax(100px, auto);
    }
    .one {
    grid-column: 1/4;
    grid-row: 1/2;
    }
    .two {
    grid-column: 1/2;
    grid-row: 2 /5;
    }
    .three {
    grid-column: 2/3;
    grid-row: 2/3;
    }
    .four {
    grid-column: 2/3;
    grid-row: 3/4;
    }
    .five {
    grid-column: 2/3;
    grid-row: 4/5;
    }
    .six {
    grid-column:3/4;
    grid-row: 2/5;
    }

  • 相关阅读:
    Eclipse常用快捷键
    java中构造方法及其作用
    jsp的验证码实现
    request.getParameter()与request.setAttribute()的区别 (转载)
    HTML表单操作的记录
    Java Collection(转载)
    Java中StringBuffer类append方法的使用
    java中string.trim()函数的使用
    doGet与doPost的区别
    celery
  • 原文地址:https://www.cnblogs.com/xiaoyueyuedeboke/p/9693411.html
Copyright © 2020-2023  润新知