grid-column-start: auto|span n|column-line;
grid-column-end: auto|span n|column-line;
grid-auto-flow
決定),通常一個元素佔用一格grid-row-start: auto|span n|column-line;
grid-row-end: auto|span n|column-line;
grid-auto-flow
決定),通常一個元素佔用一格grid-row-start: auto
grid-row-start: span 2
grid-row-start: span 3
grid-row-start: 2
grid-row-start: 3
grid-row-end: auto
grid-row-end: span 2
grid-row-end: 3
grid-row-end: 4
為 grid-column-start / grid-column-end 的縮寫。
grid-column: grid-column-start / grid-column-end;
.item1 {
grid-column: 1 / 3;
}
相等於
.item1 {
grid-column-start: 1;
grid-column-end: 3;
}
為 grid-row-start / grid-row-end 的縮寫。
grid-row: grid-row-start / grid-row-end;
.item1 {
grid-row: 2 / 4;
}
相等於
.item1 {
grid-row-start: 2;
grid-row-end: 4;
}
grid-area: grid-row-start / grid-column-start / grid-row-end / grid-column-end | itemname;
.item1 {
grid-area: 2 / 4 / 5 / 8;
}
相等於
.item1 {
grid-row-start: 2;
grid-column-start: 4;
grid-row-end: 5;
grid-column-end: 8;
}
也相等於
.item1 {
grid-row: 2 / 5;
grid-column: 4 / 8;
}