四 Layout with Flexbox

flexDirection , alignItems,  justifyContent

flexDirection(方向):

默认为 column ,可选 row(水平);

flex 只能为数字;

justify content(约束子控件位置)

flex-start  flex-end center 

space-around space-between(均匀分布)

alignItems(次轴方向)

flex-start flex-end center strentch(拉长)

使用 strentch 时,子控件移除 weight ,否则不生效;

更多 Layout 属性

你可能感兴趣的:(四 Layout with Flexbox)