zoukankan      html  css  js  c++  java
  • 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;
    }

  • 相关阅读:
    屏幕适配-使用autoLayout
    linux下activemq安装与配置
    1
    java多线程之ForkJoinPool
    Java中线程的使用
    彻底理解数据库事务
    Java中的事务——全局事务与本地事务
    SpringMVC中的几种事务管理器
    Solr5.0.0定时更新索引
    Solr通过配DIH对数据库数据做索引
  • 原文地址:https://www.cnblogs.com/xiaoyueyuedeboke/p/9693411.html
Copyright © 2011-2022 走看看