flex换行
问题:横向铺满换行,换行之后,第一行和第二行中间的空白是怎么回事?
重现代码
.main {
position: fixed;
height: 100%;
width: 100%;
display:flex;
}
wxss:
.scrollX {
width: 100%;
height: 100%;
display: flex;
flex-wrap:wrap;
flex-direction:row;
}
.back-color{
width: 30%;
height: 25%;
background-color: red;
border: 1rpx solid rebeccapurple
}
<view class=‘main’>
<view class=‘scrollX’>
<view class=‘back-color’>
</view>
<view class=‘back-color’>
</view>
<view class=‘back-color’>
</view>
<view class=‘back-color’>
</view>
</view>
</view>
1 回复