收藏
回答

小程序radio改变默认样式

radio选中的时候能否改变默认的绿色背景,改为自定义的背景颜色

回答关注问题邀请回答
收藏

4 个回答

  • 智言
    智言
    2021-09-24
     radio .wx-radio-input {
        border-radius50%;
    
    
        width24px;
        height24px;
      }
      radio .wx-radio-input {
        border-color#87858a;
      }
      radio .wx-radio-input.wx-radio-input-checked {
        border-color#0073ff !important;
    
    
        background: white !important;
        // border: 2px solid #0073FF;
      }
      radio .wx-radio-input.wx-radio-input-checked::before {
        border-radius50%;
    
    
        width20px;
    
    
        height20px;
    
    
        content"";
    
    
        background-color#0073ff;
      }
    
    2021-09-24
    有用 3
    回复
  • 涛
    2019-09-11

    radio组件,选中打勾的样式能换成其他样式吗


    2019-09-11
    有用 2
    回复 2
    • Shmily
      Shmily
      2020-07-18
      .radio .wx-radio-input.wx-radio-input-checked::before{
          width:30rpx;
       height: 30rpx;
       background-color:#6e9ad4;
       border-radius: 50%;
       content: '';
       top:50%;
       left: 50%;
      }
      2020-07-18
      1
      回复
    • Aurora
      Aurora
      2022-01-10
      解决了吗?
      2022-01-10
      回复
  • 飞天鱼
    飞天鱼
    2018-06-29


    color='‘   自定义

    <label class="radio">

               <radio color='#000' value="r1" checked="true"/>选中

    </label>



    2018-06-29
    有用 1
    回复
  • 冬雪飘零bin
    冬雪飘零bin
    2018-06-29

    可以的


    https://developers.weixin.qq.com/blogdetail?action=get_post_info&docid=0002c84233032862c6f6bb13256404&token=777866686&lang=zh_CN


    2018-06-29
    有用 1
    回复
登录 后发表内容