-
Notifications
You must be signed in to change notification settings - Fork 257
Flexbox属性图解说明
zhenglibao edited this page Jun 6, 2024
·
12 revisions
row:主轴为水平方向,起点在左端。
row-reverse:主轴为水平方向,起点在右端。
col(默认值):主轴为垂直方向,起点在上沿。
col-reverse:主轴为垂直方向,起点在下沿。
no-wrap
wrap
wrap-reverse
flex-start:沿主轴起点对齐
center: 居中对齐
flex-end: 沿主轴终点对齐
space-between: 两端对齐
space-around: 分散对齐
flex-start, center, flex-end,space-between, space-around与justifyContent中的保持一致
stretch:拉伸方式,比如父窗口纵向排列的话,相当于所有子元素宽度自动为100%
baseline:基线对齐
这里可以实时演示各种flexbox属性:https://xluos.github.io/demo/flexbox/
Flexbox Introduction & performance (in Chinese)
Tutorial 1: Create View Controller with xml layout
Tutorial 2: Create Table Cell with xml layout
Tutorial 3: Embed xml layout into traditional view hierarchy
Tutorial 4: Use custom view in xml layout
Tutorial 5: Create reusable view using xml layout file