重新复写自定义radio选中时的背景颜色无效,但checkbox可以,radio选中时的伪元素before又生效,这是什么原因呢?
/*选中更改背景颜色 无效*/
radio .wx-radio-input.wx-radio-input-checked{
border: none ;
background: red ;
}
/*选中更改背景颜色 有效*/
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
border: none ;
background: red ;
}
/* 选中后的更改背景颜色,选中样式 有效 /*
radio .wx-radio-input.wx-radio-input-checked::before {
position: absolute ;
top: 22 rpx ;
left: 23 rpx ;
width: 26 rpx ;
height: 26 rpx ;
background: yellow ;
border-radius: 50% ;
text-align: center ;
font-size: 0 rpx ;
transform: translate( -50% , -50% ) scale( 1 ) ;
-webkit-transform: translate( -50% , -50% ) scale( 1 ) ;
}