uni-app

uni-app 去除Button默认样式

2021-04-27  本文已影响0人  hao_developer
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;
}
上一篇 下一篇

猜你喜欢

热点阅读