grid

文章链接

属性:
grid-template-columns 列宽
grid-template-rows 行高
grid-row-gap 行间距
grid-column-gap 列间距
grid-gap 是行间距与列间距的缩写

  1. .container {
  2. display: grid;
  3. grid-template-columns: 100px 100px 100px;
  4. grid-template-rows: 100px 100px 100px;
  5. grid-row-gap: 20px;
  6. grid-column-gap: 20px;
  7. }