关于按钮disabled样式的修改
在实际工作中,会遇到按钮点击前后样式不一致的情况,以验证码获取为例; 1.按钮点击前的样式 2.点击后的样式 具体代码如下所示 1.xml代码部分如下 <button formType='submit' disabled='{{disabled}}' class="submit_btn" hover-class="button-hover" >提交注册</button> 2.css代码部分如下 .submit_btn{ width: 670rpx; height: 90rpx; color: #ffffff; font-size: 38rpx; line-height: 90rpx; border-radius:54rpx; text-align: center; margin-top: 50rpx; background-color: #2EA7E0; } //去除按钮的默认边框 .submit_btn::after{ border:none; } /* 按钮被按下去的颜色 */ .button-hover{ background-color: #96d3ef; } /* 按钮disabled的样式 */ button[disabled], wx-button[disabled]:not([type]) { color: #2EA7E0; border: none;