uni-app 去除Button默认样式
2021-04-27 本文已影响0人
hao_developer
![](https://img.haomeiwen.com/i1722765/78d1a65cfb93fd9b.png)
![](https://img.haomeiwen.com/i1722765/56d0b4a0d2529cb5.png)
1、使用$\color{#FF0000}{::after}伪类选择器,因为button的边框样式是通过::after方式实现的,如果在button上定义边框就会出现两条边框线,所以我们可以使用::after的方式去覆盖默认值。
button::after {
border: none;
}
2、还需要在将按钮背景色设置为白色,因为按钮默认背景色是灰色的。
button {
background-color: #fff;
}
3、去掉默认的圆角:
button {
border-radius:0;
}