为什么我的重复功能在网格属性中不起作用,在css中?

问题描述 投票:0回答:1

这段代码工作正常:

grid: [row1-start] 'header header header header header' auto [row1-end]
    [row2-start] 'menu content content content content' auto [row2-end]
    [row3-start] 'footer footer footer footer footer' auto [row3-end] / 1fr 1fr 1fr 1fr 1fr;

但是当我使用repeat()函数而不是五个1fr时,它会破坏我的网格:

grid: [row1-start] 'header header header header header' auto [row1-end]
        [row2-start] 'menu content content content content' auto [row2-end]
        [row3-start] 'footer footer footer footer footer' auto [row3-end] / repeat(5, 1fr);

我在grid-template-columns属性中使用该函数没有问题,当我想在grid属性中使用它时会出现问题。

css css3 grid-layout css-grid
1个回答
0
投票

根据文件:

doc image

完整的MDN参考here

© www.soinside.com 2019 - 2024. All rights reserved.