这段代码工作正常:
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属性中使用它时会出现问题。