微信小程序button的hover-class样式不生效的解决方法
如果button没有写type, 可以写一个标签中加一个 type=xxx 然后再wxss中使用class + type选择元素
WXML
<button type="primary" hover-class="button-hover-class">转发</button>
WXSS
.button-hover-class[type = primary]{
background-color: #465e97;
color: #fff;
}
或者
WXML
<button type="xxx" hover-class="button-hover-class">转发</button>
WXSS
.button-hover-class[type = xxx]{
background-color: #465e97;
color: #fff;
}