Style flexFlow Property
Example
Displays the flexible items as a column without wrapping:
document.getElementById("main").style.flexFlow="column nowrap";
Try it »
Definition and Usage
The flexFlow property is a shorthand property for the flexDirection and flexWrap properties.
The flexDirection property specifies the direction of the flexible items.
The flexWrap property specifies whether the flexible items should wrap onto multiple lines or columns.
**Note:** The flexFlow property has no effect if the element is not a flexible item.
Browser support

Firefox, Opera and Chrome support the flexFlow property.
Syntax
Returns the flexFlow property:
object
.style.flexFlow
Sets the flexFlow property:
object
.style.flexFlow="
flex-direction
flex-wrap
|initial|inherit"
Attribute values
| Value | Description |
|---|---|
| flex-direction | Possible values: |
row
row-reverse
column
column-reverse
initial
inherit 默认值是 "row"。
Specifies灵活项目的方向。
|
| flex-wrap | Possible values:
nowrap
wrap
wrap-reverse
initial
inherit 默认值是 "nowrap"。
Specifies灵活项目是否拆行或拆列。
|
| initial | Sets the property to its default value. See initial. | | inherit | Inherits this property from the parent element. See inherit. |
Technical Details
| Default value: | row nowrap |
|---|---|
| Return Value: | A string that represents the flex-flow property of an element. |
| CSS version | CSS3 |
Related Articles
CSS Reference Manual:flex-flow Property
HTML DOM STYLE Reference Manual:flex Property
HTML DOM STYLE Reference Manual:flexBasis Property
HTML DOM STYLE Reference Manual:flexDirection Property
HTML DOM STYLE Reference Manual:flexGrow Property
HTML DOM STYLE Reference Manual:flexShrink Property
HTML DOM STYLE Reference Manual:flexWrap Property
The Style object