微信小程序button有自带的默认样式,我们开发中根据UI界面不同会设置不一样的样式表,这是后需要将默认的样式清空
button{
background-color: #fff;
padding: 0;
margin: 0;
line-height: 1rpx;
border: 1px solid #cccccc;
min-height: 0; /* 默认自带最小高度为40px 设置小于40px式不生效需要先清空默认的最小高度再设置高度*/
}
input {
outline: none;
border: none;
list-style: none;
}
/*我们可以使用::after的方式去覆盖默认值*/
button::after {
border: none;
}
网友评论