Build a CSS Grid layout by setting columns, track sizing, gaps and breakpoints, then copy the generated CSS and HTML.
输入:列 repeat(3,1fr)、间距 16px。
处理:输出 grid 模板。
输出:display:grid;… 代码与预览。
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Fractional unit | fr shares leftover space, so 1fr 1fr gives two equal columns | CSS Grid Layout Level 2 |
| Gaps | gaps are removed before fr distribution and are not tracks | CSS Grid Layout Level 2 |
| Auto placement | grid-auto-flow chooses row or column filling for unplaced items | CSS Grid Layout Level 2 |