layout-grid

133 阅读1分钟

www.toutiao.com/i6735746869…

grid

容器 container

grid-template-columns(定义列宽) grid-template-rows(定义行高) 定义容器中每个项目的宽高属性

grid-template-areas定义网格区域,然后使用grid-area调用声明好的网格区域名称来放置对应的网格项目。

网格线定义

水平对齐justify-items justify: ˈdʒʌstɪfaɪ 两端对齐

垂直对齐: align-items

项目 item