在写微信小程序的时候遇到了这样的问题:
index.wxml文件设置按钮:
<button>按钮</button>
index.wxss设置按钮的样式为:
button{
border:none;
border-radius:0;
}
发现样式并没有起效果,这是因为微信小程序button的边框、圆角是通过button::after设置的,这样写就能够去掉边框和圆角了:
button::after{
border: none;
border-radius: 0;
}