📜  网格自动列 - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:41.928000             🧑  作者: Mango

代码示例4
repeat(/*Number of repeats*/, /*Code to be repeated*/)

.gridContainer {
    grid-template-columns: repeat(4, 100px); /*Creates 4 columns, each 100px in width*/
    grid-template-rows: repeat(2, 250px); /*Creates 2 rows, each 250px in height*/
}