zoukankan      html  css  js  c++  java
  • 如何自定义radio的样式,更改选中的颜色?

    1.html代码
    <div class="rdo">
            <input name="sex" id="male" type="radio">
            <label for="male">男</label>
    </div> 
    <div class="rdo">
            <input name="sex" id="female" type="radio">
            <label for="female">女</label>
    </div> 
     
    2.样式
    input[type="radio"] + label::before {
        content: " ";
        display: inline-block;
        vertical-align: middle;
         .853333rem;
        height: .853333rem;
        border-radius: 50%;
        border: .064rem solid #fd8869;
        margin-right: .213333rem;
        box-sizing: border-box;
    }
    input[type="radio"]:checked + label::before {
        background-color: #fd8869;
        background-clip: content-box;
        padding: .149333rem;
        box-sizing: border-box;
    }
    input[type="radio"] {
        position: absolute;
        clip: rect(0, 0, 0, 0);
    }
     

  • 相关阅读:
    MegaCli 简易使用介绍
    【转】RAID 技术发展综述
    HOWTO For iSCSI-SCST && Gentoo HOWTO For iSCSI-SCST
    FC磁盘设备管理
    targetcli配置iSCSI
    NVMe协议1.3c(一) 概述
    NVMe概述
    Jenkins slave image
    ansible module
    Ansible Filter
  • 原文地址:https://www.cnblogs.com/wx2019/p/14325394.html
Copyright © 2011-2022 走看看