flex排列布局中尾排不够与上一排的数量相等时,但又采用了justify-content: center;。就会造成排列的混乱,怎么解决这个问题呢
.recharge .recharge-main .recharge-money .mon-bot {
display: flex;
margin-top: 30rpx;
flex-wrap: wrap;
box-sizing: border-box;
justify-content: space-between;
}
.recharge .recharge-main .recharge-money .mon-bot .money {
flex-basis: 30%;
/* box-sizing: border-box; */
margin-bottom: 10px;
border: 2px solid #dcdde1;
padding: 20rpx 0;
display: flex;
align-items: center;
height: 20px;
justify-content: center;
}
//直接在使用了justify-content:center中写margin-right: 34%(百分比是根据自己的效果来调整的)就可以解决了
.recharge .recharge-main .recharge-money .mon-bot .money:last-child:nth-child(3n-1){
margin-right: 34%;
}