一、微信小程序radio 選中顏色
1.微信小程序radio標籤,自帶color屬性,可控制選中的顏色
2.默認的禁用顏色是自帶綠色,而不是color指定的顏色
二、全局重置微信小程序radio 選中顏色/禁用顏色處理
使用,樣式重寫重置選中顏色,禁用顏色
使用這種方式color指定的顏色將不起作用。
/*選中樣式*/
radio .wx-radio-input.wx-radio-input-checked {
border-color: #f78209 !important;
background: #f78209 !important;
}
radio .wx-radio-input.wx-radio-input-checked::before {
border-radius: 50%;
width: 20px;
height: 20px;
line-height: 20px;
text-align: center;
font-size: 15px;
color: #fff;
background: transparent;
transform: translate(-50%, -50%) scale(1);
-webkit-transform: translate(-50%, -50%) scale(1);
}
/*禁用樣式*/
radio .wx-radio-input.wx-radio-input-disabled {
border: 2rpx solid #999999;
border-radius: 100%;
background: red!important;
}
更多:
微信小程序輸入框去除完成按鈕欄_TextArea去除完成按鈕欄