chenMeiFeng

导航

微信小程序中修改单选和多选框的样式

radio .wx-radio-input {
width: 28rpx;
height: 28rpx;
margin-right: 15rpx;
border-radius: 50%;
}

/*radio选中后样式 */
radio .wx-radio-input.wx-radio-input-checked {
width: 28rpx;
height: 28rpx;
background: #3A7EFD !important;
border-color: #3A7EFD !important;
}

/*radio选中后图标样式 */
radio .wx-radio-input.wx-radio-input-checked::before {
font-size: 22rpx;
color: #fff;
transform: translate(-50%, -50%) scale(1);
-webkit-transform: translate(-50%, -50%) scale(1);
}

/checkbox的大小/ checkbox .wx-checkbox-input {
width: 34rpx;
height: 34rpx;
border-radius: 50%;
}

/*checkbox选中后样式 */
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
background: #0394F0;
border-color: #0394F0;
}

/*checkbox选中后图标样式 */
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
width: 20rpx;
height: 20rpx;
line-height: 20rpx;
text-align: center;
font-size: 22rpx;
color: #fff;
background: transparent;
transform: translate(-50%, -50%) scale(1);
-webkit-transform: translate(-50%, -50%) scale(1);
}

 

 

H5页面

/deep/ uni-checkbox .uni-checkbox-input {
border-radius: 50%;
width: 40rpx;
height: 40rpx;
border: 2rpx solid #cccccc;
}

/deep/ uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
border: 2rpx solid #cccccc;
border-color: #1A8FFF;
background: -webkit-linear-gradient(#1A8FFF, #1A8FFF);
}

/deep/ uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked:before {
font-size: 32rpx;
color: #fff;
}

 

https://www.cnblogs.com/sunRiseProgress/p/15210426.html

 

posted on 2022-04-21 09:36  CV搬运工  阅读(604)  评论(0编辑  收藏  举报