小程序radio默认样式修改

/* radio样式修改 */
/* 单选、多选 勾选 */
/* 默认背景样式*/
radio .wx-radio-input{
  width: 20rpx;
  height: 20rpx;
  background-color: #fff!important;
  text-align: center;
  line-height: 20rpx;
}
 /* 选中后的 背景样式 (红色背景 无边框 可根据UI需求自己修改) */
 radio .wx-radio-input.wx-radio-input-checked {
   border-color: #333!important;
   opacity: 0.5;
   background: #fff!important;
   border:node;
 }
  
 /* 选中后的 对勾样式 (白色对勾 可根据UI需求自己修改) */
 radio .wx-radio-input.wx-radio-input-checked::before {
  /* 去除对号 */
  content: ''; 
  /* content: '对';  */
  border-radius: 50%;
  background-color: #333!important;
  opacity: 1;
  width: 20rpx; /* 选中后对勾大小,不要超过背景的尺寸 */
  height: 20rpx; /* 选中后对勾大小,不要超过背景的尺寸 */
  line-height: 20rpx;
  border: none;
  text-align: center;
  border: none;
 }
posted @ 2022-10-27 10:31  SultanST  阅读(20)  评论(0编辑  收藏  举报