zoukankan      html  css  js  c++  java
  • 修改原生单选框样式(vue单选组件)

    一、效果如图

     二、实现

    修改单选样式

    //html
    <div class="radio-wrap">
              <input type="radio" v-model="pointer" :value="item" :id="'selectDoll_'+index" :disabled="item.money > rechargeMoney">
              <label :for="'selectDoll_'+index" @click="judgeMoney(item)"></label>
    </div>
    
    //less
    <style type="text/css" scoped lang="less">
      @bf: 108rem;
        .radio-wrap{
            position: absolute;
            top:100/@bf;
            right:50/@bf;
            height: 70/@bf;
             70/@bf;
            line-height: 50/@bf;
            vertical-align: middle;    
            input[type="radio"] {
                 55/@bf;
                height: 55/@bf;
                opacity: 0;
                cursor: pointer;
            }
            label{
              position: absolute;
              left: 0;
              top: 0;
               .61rem;
              height:.6rem;
              border-radius: 50%;
              border: 1px solid #999999; 
            }
            input:checked+label { 
                background: #fde117;
                border: 1px solid #999999;
            }     
            input:checked+label::after {
                position: absolute;
                content: "";
                 .13rem;
                height: .3rem;
                top: .07rem;
                left: .2rem;
                background: #fde117;
                border: 2px solid #333;
                border: 1px solid #333;
                border-top: none;
                border-left: none;
                transform: rotate(45deg);
            }
        }   
    }
    </style>
    

      

     

  • 相关阅读:
    JS判断对象中是否存在某参数
    JS通过url下载文件
    .NET CORE LinQ查询中计算时间差
    C# 判断某个时间是星期几
    C#数组去重
    python Tank
    kubeflannel.yml Tank
    片言只语 Tank
    other Tank
    ERROR大集合 Tank
  • 原文地址:https://www.cnblogs.com/leaf930814/p/8408953.html
Copyright © 2011-2022 走看看