Blogger Information
Blog 42
fans 0
comment 0
visits 15683
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
0713 grid容器讲解
小言
Original
319 people have browsed it

grid容器

grid-template-columns/rows 生成单元格

  1. <div class="container">
  2. <div class="item"></div>
  3. <div class="item"></div>
  4. <div class="item"></div>
  5. <div class="item"></div>
  6. <div class="item"></div>
  7. </div>
  1. grid-template-columns: 10em 10em 10em;
  2. grid-template-rows: 10em 10em 10em;

移动 单元格 到指定位置

  1. .container > .item:first-of-type{
  2. background-color: bisque;
  3. grid-row: 2 /3;
  4. grid-column: 2 /4;
  5. }

grid-area

  1. grid-area: 2 / 2 / span 3 / span 2;

grid-auto-flow

  1. grid-auto-flow: row;
  2. grid-auto-flow: column;

grid-auto-rows

自动 设置大小

  1. grid-auto-rows: 10em;

gap

设置行列间距

  1. gap:1em;

place-content

剩余空间排列

  1. place-content:start right;

place-items

网络 单元格 对齐

  1. place-items: start right;

place-self

指定对齐

  1. place-self:end right;

Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post