zoukankan      html  css  js  c++  java
  • grid表格

    grid表格
    HTML
    <!DOCTYPE html>
    <html>
    <head>
     <title>网格</title>
     <link rel="stylesheet" type="text/css" href="positiontest.css">
    </head>
    <body>
    <div class="wrapper">
       <div class="one">one</div>
     <div class="two">two</div>
     <div class="three">three</div>
     <div class="four">four</div>
     <div class="five">five</div>
     <div class="six">six</div>
    </div>

     

    </body>
    </html>
     
    css
    .wrapper {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-gap: 10px;
      grid-auto-rows: minmax(100px, auto);
     /* display: grid;
      grid-template-columns:  repeat(5,1fr ) ;*/
    }
    .one {
      background: red;
     
     grid-column: 1 / 3;
      grid-row: 1;
    }
    .two {
      background: blue;
     
     
     
      grid-column: 2 / 4;
      grid-row: 1 / 3;
      background: yellow;
    }
    .three {
      grid-column: 1;
      grid-row: 2 / 5;
      background-color: red;
    }
    .four {
      grid-column: 3;
      grid-row: 3;
      background-color: blue;
    }
    .five {
      grid-column: 2;
      grid-row: 4;
      background-color: yellow;
    }
    .six {
      grid-column: 3;
      grid-row: 4;
      background-color: red;
    }
  • 相关阅读:
    Multidimensional Arrays
    TortoiseGit
    Excel教程(14)
    Excel教程(13)
    Excel教程(12)
    Excel教程(11)
    lock
    reflect
    game
    html x
  • 原文地址:https://www.cnblogs.com/ambitious-to-49/p/10133796.html
Copyright © 2011-2022 走看看