小程序原生button伪元素

发布于 7 年前作者 chaoliang10884 次浏览最后编辑 7 年前来自 ask
  • 当前 Bug 的表现(可附上截图)

  • 预期表现

  • 复现路径

  • 提供一个最简复现 Demo

无法操作,默认显示,没法调样式,如何去掉?

1 回复
jun25
jun251 楼5 年前

你要重写button样式?可以啊

栗子:

button{

    border: none;

    border-radius: 0;

    width: 80%;

    margin: 0 10%;

    box-shadow: 0rpx 20rpx 30rpx 8rpx #ccc;

    background: #fff;

    -webkit-transition: all 0.1s ease-in-out 0s;

    -o-transition: all 0.1s ease-in-out 0s;

    transition: all 0.1s ease-in-out 0s;

}

button::after{

    border: none;

}

.button-hover{

    transform: translate(0px,28rpx) ;

    border: none;

    border-radius: 0;

    width: 80%;

    margin: 0 10%;

    box-shadow: 0rpx 20rpx 30rpx 8rpx #fff;

    background: #ccc;

    color: #fff

}