美文网首页uni-app
uni-app 去除Button默认样式

uni-app 去除Button默认样式

作者: hao_developer | 来源:发表于2021-04-27 15:47 被阅读0次
image.png
image.png

1、使用$\color{#FF0000}{::after}伪类选择器,因为button的边框样式是通过::after方式实现的,如果在button上定义边框就会出现两条边框线,所以我们可以使用::after的方式去覆盖默认值。

button::after {
  border: none;
}

2、还需要在将按钮背景色设置为白色,因为按钮默认背景色是灰色的。

button {
  background-color: #fff;
}

3、去掉默认的圆角:

button {
  border-radius:0;
}

相关文章

网友评论

    本文标题:uni-app 去除Button默认样式

    本文链接:https://www.haomeiwen.com/subject/citprltx.html