微信小程序按钮渐变色配合disable无效问题

按钮样式 

.btn-area button {
  background: linear-gradient(270deg, rgba(252, 16, 67, 1) 0%, rgba(237, 1, 123, 1) 100%);
  color: #fff;
  line-height: 84rpx;
  font-size: 32rpx;
}

按钮disable样式

button[disabled] {
  border: none !important;
  outline: none !important;
  color: #fff !important;
  background: #dbdce1 !important;
}

原来是我button[disabled] 的background用了background-color导致样式没统一没覆盖到

猜你喜欢

转载自blog.csdn.net/CrazBarry/article/details/90474568