flex-direction
介绍
定义flex
容器中的元素排列方向,该方向作为flex
容器的排版主轴,另外一个方向称为交叉轴。
取值
flex-direction: row;
flex-direction: row-reverse;
flex-direction: column;
flex-direction: column-reverse;
1
2
3
4
2
3
4
row
默认值。flex
容器中的元素按照文本方向进行排版。主轴的方向和文本方向一致。row-reverse
和row
的表现一致,但是方向相反。column
flex
容器中的元素按照书写模式的方向进行排版,主轴的方向和书写模式的方向一致column-reverse
和column
表现一致,但是方向相反
标准化语法
row | row-reverse | column | column-reverse
1
注意事项
此属性不具备继承关系。