完整版
基本概念
父容器属性
- flexDirection
默认取值flexColumn
确定子组件排列方向,取值及效果如下
-
row
-
column
-
row-reverse
-
column-reverse
-flexWrap
默认取值nowrap
定义子元素在父视图内是否允许多行排列 取值及效果如下
-
nowrap
-
wrap
-justifyContent
默认取值flex-start
定义子元素在主轴方向的分配方式 取值及效果如下
-
flex-start
-
flex-end
-
center
-
space-between
-
space-around
-alignItems
默认取值stretch
与justify-content相同的方式在侧轴方向上将当前行上的弹性元素对齐 取值及效果如下
-
flex-start
-
flex-end
-
center