flex-flow
CSS
shorthand property
specifies the direction of a flex container, as well as its wrapping behavior.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
此特性是下列 CSS 特性的简写:
/* flex-flow: <'flex-direction'> */ flex-flow: row; flex-flow: row-reverse; flex-flow: column; flex-flow: column-reverse; /* flex-flow: <'flex-wrap'> */ flex-flow: nowrap; flex-flow: wrap; flex-flow: wrap-reverse; /* flex-flow: <'flex-direction'> and <'flex-wrap'> */ flex-flow: row nowrap; flex-flow: column wrap; flex-flow: column-reverse wrap-reverse; /* Global values */ flex-flow: inherit; flex-flow: initial; flex-flow: unset;
见
flex-direction
and
flex-wrap
for details on the values.
| 初始值 |
as each of the properties of the shorthand:
|
|---|---|
| 适用于 | flex containers |
| 继承 | no |
| 计算值 |
as each of the properties of the shorthand:
|
| 动画类型 | discrete |
<'flex-direction'> || <'flex-wrap'>
element {
/* Main-axis is the block direction with reversed main-start and main-end. Flex items are laid out in multiple lines */
flex-flow: column-reverse wrap;
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Flexible Box Layout Module
The definition of 'flex-flow' in that specification. |
候选推荐 | 初始定义 |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
flex-flow
|
Chrome 完整支持 29 | Edge 完整支持 12 |
Firefox
完整支持
28
|
IE 完整支持 11 | Opera 完整支持 12.1 | Safari 完整支持 9 | WebView Android 完整支持 4.4 | Chrome Android 完整支持 29 |
Firefox Android
完整支持
28
|
Opera Android 完整支持 12.1 | Safari iOS 完整支持 9 | Samsung Internet Android 完整支持 2.0 |
完整支持
用户必须明确启用此特征。
要求使用供应商前缀或不同名称。
flex
flex-basis
flex-direction
flex-flow
flex-grow
flex-shrink
flex-wrap
order