一步到位
外边盒子作为容器 display:flex
flex:1; 平均分割 响应式布局跟bootstrap col差不多
flex-direction:row; 全部显示为一行 响应式布局跟bootstrap row差不多
flex-direction:column; 全部显示为一列
flex-wrap: wrap; 一定宽度自动换行到第二行,以此类推
flex-wrap: nowrap; 不换行一直积压,以此类推
align-items:flex-start; 垂直最上边
align-items:center; 垂直居中
align-items:flex-end; 垂直最下边
justify-content:flex-start; 水平最左边
justify-content:flex-end; 水平最右边
justify-content:center; 水平中间
justify-content:space-between; 两端对齐
justify-content:space-around; 间隔对齐
align-content:center; 和align-items一样基础行容器(必须设置高度)
<view style="height: 160rpx;display:flex;flex-direction:row;align-items:center;">
<view style="flex-direction:column;">
内容代码
</view>
</view>
所有居中对齐方式,全在行容器样式上进行修改