1.html代码
<div class="rdo">
        <input name="sex" >
        <label for="male">男</label>
</div> 
<div class="rdo">
        <input name="sex" >
        <label for="female">女</label>
</div> 
 
2.样式
input[type="radio"] + label::before {
    content: " ";
    display: inline-block;
    vertical-align: middle;
    width: .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);
}
 

相关文章:

  • 2022-02-06
  • 2022-01-10
  • 2022-01-20
  • 2021-06-10
  • 2021-07-01
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-30
  • 2021-12-29
  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2021-12-06
相关资源
相似解决方案