点击运行
grid-auto-flow 属性
grid-auto-flow
属性控制如何在网格中插入自动放置的项目。
这个网格有三列两行。
"item3" 横跨两列,那其他项目在哪里呢?
grid-auto-flow: row
1
2
3
4
grid-auto-flow: row dense
"dense" 值会填充网格中的孔:
1
2
3
4
运行结果