如果想要多行弹性布局只需要在父级设置这几个参数就好了,里面的子元素设置30%的宽度
display: flex;
flex-flow:row wrap;
justify-content: space-between;
.content-ico{
width: 100%;
height: 440rpx;
background: #fff;
border-radius: 20px;
display: flex;
flex-flow:row wrap;
justify-content: space-between;
padding: 75rpx 75rpx 0 75rpx;
view{
width: 30%;
height: 125rpx;
background: #007AFF;
}
}
如果想要它有空缺的时候继续往前挨着的话在父级写这几个参数就好了
.content-ico:after {
content: "";
width: 30%;
}
全部代码:
.content-ico{
width: 100%;
height: 440rpx;
background: #fff;
border-radius: 20px;
display: flex;
flex-flow:row wrap;
justify-content: space-between;
padding: 75rpx 75rpx 0 75rpx;
view{
width: 30%;
height: 125rpx;
background: #007AFF;
}
}
.content-ico:after {
content: "";
width: 30%;
}