首页 > 其他 > 详细

grid

时间:2018-10-07 23:49:15      阅读:132      评论:0      收藏:0      [点我收藏+]

<!DOCTYPE html>
<html>
 <head>
  <meta charset="{CHARSET}">
  <title>11</title>
  <style type="text/css">
   .wrapper {
    display: grid;
    grid-template-columns: 100px 100px 100px;
    grid-template-rows: 100px 100px  100px;
    }
    .item1 {
    grid-column-start: 1;
    grid-column-end: 4;
    background-color: red;
}
    .item2 {
    grid-column-start: 2;
    grid-column-end: 4;
    background-color: goldenrod;
}
.item3 {
    grid-row-start: 2;
    grid-row-end: 4;
        background-color: green;
}
.item4 {
    grid-column-start: 2;
    grid-column-end: 4;
        background-color: gray;
}
.item5 {
    grid-column-start: 1;
    grid-column-end: 3;
    background-color: palegreen;
}
.item6{
    grid-column-start: 3;
    grid-column-end: 3;
    background-color: aliceblue;
}
  </style>
  
 </head>
 <body>
  <div class="wrapper">
  <div class="item1">1</div>
  <div class="item2">2</div>
  <div class="item3">3</div>
  <div class="item4">4</div>
  <div class="item5">5</div>
  <div class="item6">6</div>
</div>
 </body>
</html>

grid

原文:https://www.cnblogs.com/ghostandgod/p/9751944.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!