我想使用设置网格中每一行的行高grid-template-rows: repeat(auto-fill, 200px),但意识到它仅适用于网格的第一行。事实证明grid-auto-rows: 200px更适合我的需求,但我仍然想知道为什么使用auto-fillingrid-template-rows: repeat(auto-fill, 200px)只设置第一行而不是所有行的高度。注意:如果我使用整数而不是auto-fill正确设置指定行数的高度。
grid-template-rows: repeat(auto-fill, 200px)
grid-auto-rows: 200px
auto-fill
图片示例:
grid-template-rows: repeat(3, 200px)
css css-grid
css ×1
css-grid ×1