弹性容器(flex-direction)
row:横向
column:纵向
<view class='flex-container'>
<view class='view-size bg-red'></view>
<view class='view-size bg-green'></view>
<view class='view-size bg-yellow'></view>
</view>
.flex-container{
display: flex;
flex-direction: row;
background-color: lightcyan;
height: 800rpx;
width: 100%;
}
.view-size{
height: 200rpx;
width: 200rpx;
}
.bg-red{
background-color: red;
}
.bg-green{
background-color: green;
}
.bg-yellow{
background-color: yellow;
}
在flex.wxss的.flex-container中加入
justify-c