这段代码工作正常:
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 - 为什么我的重复函数在 css 的网格属性中不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48631375/