微信小程序如何修改radio和checkbox的默认样式和图标

/* 默认背景样式*/

.radio-item .wx-radio-input {

  width: 32rpx;

  height: 32rpx;

  background-color: #ffffff !important;

  text-align: center;

  line-height: 32rpx;

}

/* 选中后的 背景样式 (红色背景 无边框 可根据UI需求自己修改) */

.radio-item .wx-radio-input.wx-radio-input-checked {

  border-color: #ffffff !important;

  /* opacity: 0.5; */

  background: #FF4D45 !important;

  border: node;

}

/* 选中后的 对勾样式 (白色对勾 可根据UI需求自己修改) */

.radio-item .wx-radio-input.wx-radio-input-checked::before {

  /* 去除对号 */

  content: '';

  /* content: '对';  */

  border-radius: 50%;

  background-color: #ffffff !important;

  opacity: 1;

  width: 20rpx;

  /* 选中后对勾大小,不要超过背景的尺寸 */

  height: 20rpx;

  /* 选中后对勾大小,不要超过背景的尺寸 */

  line-height: 20rpx;

  border: none;

  text-align: center;

  border: none;

}

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容