CSS: flex-wrap

By Xah Lee. Date: . Last updated: .

flex-wrap

flex-wrap: nowrap

The default. Items remain in a single line and may overflow the container.

1
2
3
4
5
6
flex-wrap: wrap

Items break into multiple lines, stacking in the direction defined by flex-direction.

1
2
3
4
5
6
flex-wrap: wrap-reverse

Items wrap into multiple lines but stack in the reverse order in the cross-axis.

1
2
3
4
5
6

CSS, flex layout