Flexbox & Grid
用于控制网格中元素如何自动放置的实用工具。
类名 | 样式 |
---|---|
grid-flow-row | grid-auto-flow: row; |
grid-flow-col | grid-auto-flow: column; |
grid-flow-dense | grid-auto-flow: dense; |
grid-flow-row-dense | grid-auto-flow: row dense; |
grid-flow-col-dense | grid-auto-flow: column dense; |
使用类似 grid-flow-col
和 grid-flow-row-dense
这样的实用工具来控制网格布局中自动放置算法的工作方式
<div class="grid grid-flow-row-dense grid-cols-3 grid-rows-3 ..."> <div class="col-span-2">01</div> <div class="col-span-2">02</div> <div>03</div> <div>04</div> <div>05</div></div>
前缀a grid-auto-flow
实用工具 使用断点变体,例如 md:
,以仅在以下情况下应用该实用工具中等 屏幕尺寸及以上
<div class="grid grid-flow-col md:grid-flow-row ..."> <!-- ... --></div>
在变体文档中了解更多关于使用变体的信息。