先上效果图:
wxml:
<view class="box">
<button class="item" plain>1</button>
<button class="item" plain>2</button>
<button class="item" plain>3</button>
<button class="item" plain>4</button>
</view>
wxss:
.box{
display: flex;
width: 100%;
height: 100%;
flex-wrap: wrap;
justify-content: space-around;
align-content: center;
margin-top: 200rpx;
}
.box .item{
display: flex;
flex-direction: column;
width: 320rpx;
height: 320rpx;
border-radius: 70rpx;
background-color: rgb(186, 218, 23);
justify-content: center;
align-items: center;
margin-bottom: 40rpx;
}
希望对你有所帮助~