CSS flex-wrapProperty
Browser Support
The numbers in the table specify the first browser version that supports the property.
Numbers followed by -webkit-, -ms- or -moz- specify the first version that worked with the prefixed property.
| Property | |||||
|---|---|---|---|---|---|
| flex-wrap | 29.0 21.0 -webkit- |
11.0 10.0 -ms- |
28.0 18.0 -moz- |
9.0 6.1 -webkit- |
17.0 |
Definition and Usage
The flex-wrap property specifies whether the flex container is single-line or multi-line, and the direction of the cross axis determines the direction in which new lines are stacked.
Note:If the element is not a flex item, the flex-wrap property has no effect.
| Default value: | nowrap |
|---|---|
| Inherited: | no |
| Animatable: | No. SeeCan be animated (animatable)。 |
| version: | CSS3 |
| JavaScript Syntax: | object.style.flexWrap="nowrap" Try it Yourself |
CSS Syntax
flex-wrap: nowrap|wrap|wrap-reverse|initial|inherit;
Property value
| Value | Description |
|---|---|
| nowrap | Default value. Specifies that flexible items will not wrap. |
| wrap | Specifies that flexible items will wrap when necessary. |
| wrap-reverse | Specifies that flexible items will wrap when necessary, but in reverse order. |
| initial | Sets this property to its default value. Seeinitial。 |
| inherit | Inherited from the parent element. Seeinherit。 |
Related Articles
CSS Reference Manual:flex property
CSS Reference Manual:flex-direction property
CSS Reference Manual:flex-flow property
CSS Reference Manual:flex-grow property
CSS Reference Manual:flex-shrink property
CSS Reference Manual:flex-basis property
other extensions