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>
了解有关在变体文档中使用变体的更多信息。