90. CSS grid 4
grid-column
.green{
grid-column-start:1;
grid-column-end:3;
}
Fox grid starts from 1 and ends at 3.
if grid-column-end:4; then fox ends 4.
If we make it smaller, this is not that responsive because we said one to four it doesn't actually make it as responsible as it was before and it actually extends to make sure that it fills in one to four.
And there's a shorthand way of doing this.
Instead of saying grid-column-start:1;
grid-column-end:3;
.green{
grid-column:1/4;
}
^this is same thing.
.green{
grid-column:1/-1;
}
^which means all the way till the end.
CSS grid -1 signifies the end of the viewport.
span
default is span 1.
.green{
grid-column:span 2;
}
span across two grids.
^You see that green is spanning across two grids.
.green{
grid-column:span 2;
grid-row: 1/3;
}
unicorn automatically moved it all the way up because we wanted to start at one as well.
Author And Source
이 문제에 관하여(90. CSS grid 4), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@bianjy/90.-CSS-grid-4저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)