WXML里面:
<button hover="true" class="Itembtn" hover-class="btnhover"></button>
WXSS里面:
.Itembtn {
height: 58rpx;
display: inline-block;
line-height: 58rpx;
font-size: 30rpx;
color: #666;
background: #fff;
padding-left: 30rpx;
padding-right: 30rpx;
margin-right: 34rpx;
margin-bottom: 20rpx;
border-radius: 2rpx;
}
.btnhover {
background-color: #10a1ed;
border-radius: 10rpx;
}
最重要的是hover-class这个属性
网友评论