当此样式代码直接在button控件的style中填入时能实现按钮无边框的效果,但如果是在button空间用class引用wxss文件中的此样式代码则无法实现按钮无边框效果
我把源码和效果图给你看看
wxml:
<button class=‘btn’ plain=‘true’ bindtap=‘clkMinus’ data-index=’{{index}}’>
<image src=’/icon/minus.png’ mode=‘aspectFit’ class=“btn_bg”></image>
</button>
wxss:
.btn{
position:absolute;
float:right;
border:0px solid red;
right:25px;
width:20px;
height:20px;
}
.btn::after{
border: none;
}
wxml:
<button class=‘btn’ plain=‘true’ bindtap=‘clkMinus’ data-index=’{{index}}’>
<image src=’/icon/minus.png’ mode=‘aspectFit’ class=“btn_bg”></image>
</button>
wxss:
.btn{
position:absolute;
float:right;
border:0px solid red;
right:25px;
width:20px;
height:20px;
}
.button::after{
border: none;
}
wxml:
<button style=‘position:absolute;float:right;border:0px solid red;right:25px;width:20px;height:20px;’ plain=‘true’ bindtap=‘clkMinus’ data-index=’{{index}}’>
<image src=’/icon/minus.png’ mode=‘aspectFit’ class=“btn_bg”></image>
</button>
.btn::after{
border:none;
}
和.button::after{
border:none;
}
我都试过,没有效果,倒是直接在style里设置边框0px有效果