「grid-template-columns: repeat(4, 100px);」を使用

1
2
3
4
5

window幅に応じ、grid数を可変

1
2
3
4
5

window幅に応じ、grid幅を可変 1. repeat(auto-fill, minmax(100px, 1fr))

1
2
3
4
5

window幅に応じ、grid幅を可変 2. repeat(auto-fit, minmax(100px, 1fr))

1
2
3
4
5

window幅に応じ、grid行数を可変. grid-auto-rows: 100px;

1
2
3
4
5
1
2
3
4
5
1
2
3
4
5