CSS flex-flow Property
Description
The flex-flow
property allows you to specify flex-direction property values in a single declaration (sets the direction in which the flex elements are located inside the flex container), and flex-wrap (determines whether the flex container will be single-line or multi-line). Before using the flex-flow
property in work, I recommend that you familiarize yourself with the listed properties individually.
- Initial value
- See individual properties
- Applies to
- Flex containers
- Inherited
- No
- Computed value
- See individual properties
- Animatable
- No
- JavaScript syntax
- object.style.flexFlow
Interactive Demo
Syntax
flex-flow: flex-direction || flex-wrap
Values
- flex-directionSee flex-direction CSS property for values.
- flex-wrapSee flex-wrap CSS property for values.
Example
<h3>flex-flow: row nowrap;</h3>
<div class="container"><div>A</div><div>B</div><div>C</div></div>
<h3>flex-flow: row-reverse wrap-reverse;</h3>
<div class="container2"><div>A</div><div>B</div><div>C</div></div>
<h3>flex-flow: row-reverse wrap;</h3>
<div class="container3"><div>A</div><div>B</div><div>C</div></div>
.container {
display: -webkit-flex;
display: flex;
-webkit-flex-flow: wrap-reverse;
flex-flow: row nowrap;
}
.container2 {
display: -webkit-flex;
display: flex;
-webkit-flex-flow: wrap-reverse;
flex-flow: row-reverse wrap-reverse;
}
.container3 {
display: -webkit-flex;
display: flex;
-webkit-flex-flow: wrap-reverse;
flex-flow: row-reverse wrap;
}
div>div {
width: 40%;
height: 25px;
border: 1px solid orange;
background: white;
}
Browser Support
The following table will show you the current browser support for the CSS flex-flow
property.
Desktop | |||||
12 | 29 | 28 | 12.1 | 9 |
Tablets / Mobile | |||||
29 | 28 | 12.1 | 9 | 2 | 4.4 |
Last updated by CSSPortal on: 1st January 2024