button组件中文字水平垂直居中显示
wxml:
<button class='button-item other-item' >C</button>
wxss:
.button-item{
height: 100%;
width:25%;
border-radius: 0;
font-size: 1rem;
//button设置成flex
display: flex;
align-items: center;
justify-content: center;
}

网友评论