选择按钮样式

<div class="apply_con_type">
            <div>
                <input type="radio" name="identity" value="1" >
                <label class="radio-label" for="">农户、社区居民</label>
            </div>
            <div>
                <input type="radio" name="identity" value="2" >
                <label class="radio-label" for="">工薪人员</label>
            </div>
            <div>
                <input type="radio" name="identity" value="3" >
                <label class="radio-label" for="">个体户、小微企业主</label>
            </div>
            <div>
                <input type="radio" name="identity" value="4" >
                <label class="radio-label" for="">新型农业经营者</label>
            </div>
        </div>


.apply_con_type input{
    vertical-align: sub;
}
.apply_con_type input[type="radio"] {
    position: absolute;
    opacity: 0;
    z-index: 1;
    width: 3.2rem;
  }
.apply_con_type input[type="radio"] + .radio-label:before {
    content: '';
    background: #fff;
    border-radius: 100%;
    border: 1px solid #dadada;
    display: inline-block;
    width: 14px;
    height: 14px;
    position: relative;
    margin-right: 0.3rem;
    vertical-align: sub;
    cursor: pointer;
    text-align: center;
    -webkit-transition: all 250ms ease;
    transition: all 250ms ease;
}
.apply_con_type input[type="radio"]:checked + .radio-label:before {
    background-color: #2c73c5;
    box-shadow: inset 0 0 0 3px #fff;
}
.apply_con_type input[type="radio"]:focus + .radio-label:before {
    outline: none;
}
.apply_con_type input[type="radio"]:disabled + .radio-label:before {
    box-shadow: inset 0 0 0 3px #fff;
    border-color: #dadada;
    background: #dadada;
}
.apply_con_type input[type="radio"] + .radio-label:empty:before {
    margin-right: 0;
}
.apply_con_type div{
    margin: 0.267rem;
}
.radio-label{
    font-size: 0.347rem;
    color: #666666;
}

在这里插入图片描述

发布了93 篇原创文章 · 获赞 17 · 访问量 3万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览