Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS flex-flow property

CSS flex-flow property

CSS Reference Manual CSS Reference Manual

Example

Display the flexbox elements in reverse order and wrap them when necessary:

display:flex;

flex-flow:row-reverse wrap;

Try it »


Browser support

The numbers in the table indicate the version number of the first browser that supports this property.

The number immediately following -webkit-, -ms-, or -moz- is the first version that supports the prefixed property.

property
flex-flow 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-flow property is a shorthand property for flex-direction and flex-wrap.

The flex-flow property is used to set or retrieve the arrangement of the child elements of a flexbox model object.

The flex-direction property specifies the direction of the flexible items.

The flex-wrap property specifies whether flexible items should wrap into lines or columns.

**Note:** If the element is not a flexbox object, the flex-flow property has no effect.

Default value: row nowrap
Inherited: No
Animatable: No. See Animatable.
Version: CSS3
JavaScript syntax: object.style.flexFlow="column nowrap" Try it

CSS Syntax

flex-flow:

flex-direction

flex-wrap

|initial|inherit;

Attribute values

Value Description
flex-direction Possible values:
 row       
 row-reverse       
 column       
 column-reverse       
 initial       
 inherit     

默认值是 "row"。

规定灵活项目的方向。

|

| flex-wrap | Possible values:

 nowrap       
 wrap       
 wrap-reverse       
 initial       
 inherit     

默认值是 "nowrap"。

规定灵活项目是否拆行或拆列。

|

| initial | Sets the property to its default value. See initial. | | inherit | Inherits this property from the parent element. See inherit. |


Related Articles

CSS Reference Manual:flex Property

CSS Reference Manual:flex-basis Property

CSS Reference Manual:flex-direction Property

CSS Reference Manual:flex-grow Property

CSS Reference Manual:flex-shrink Property

CSS Reference Manual:flex-wrap Property

CSS Reference Manual CSS Reference Manual