view組件和flexbox彈性盒子模型
flex-direction: row / column 默認為row 橫向布局即橫向為主軸方向,縱向為副軸
flex-direction: row

flex-direction-row.png
flex-direction: column

flex-direction-column.png
- 使用盒子布局需要首先設置 display: flex
- 設置盒子布局方向 flex-direction: row; //橫向布局 默認
- 設置主軸方向的布局 justify-content: flex-start; //主軸開始位置
- 設置副軸方向的布局 align-items: flex-end; //副軸從末尾開始布局
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: flex-end;