⼩程序flex-row布局中button的问题
在⼩程序开发中最常见的布局即为flex布局,在flex布局中我们知道两边对齐可以⽤ justify-content: space-between;css样式实现,但是在处理button⽅⾯上butoon始终不能靠边对齐。解决⽅法如下(在button样式中加个margin-right: 0;即可):
.flex-row{
display: flex;
flex-direction: row;
align-items: center;
}
.carbin-item{
width: 90%;
justify-content: space-between;
padding: 20rpx;
border-bottom: solid #eee 2rpx;
font-size: 11pt;
}
.carbin-item button{
font-size: 11pt;
width:40%;
flex布局对齐方式margin-right: 0;
}

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。