checked 选中后 label 样式不显示

Html

<div class="radio_style" style="margin-left:15px;">

<input type="radio" name="identity" value="0" onclick="changetr(1)" id="suident"/>

<label for="suident">

<div class="c"></div>

</label>

</div>


CSS

.reg_box .inp_line .rights .radio_style{ width:65px;height:28px;border-radius:14px;position:relative;float:left;margin:4px 0;box-shadow:0 0 9px rgba(0,0,0,0.15);}

.reg_box .inp_line .rights .radio_style input[type=radio]{ visibility:hidden;}

.reg_box .inp_line .rights .radio_style label{ position:absolute;left:0;top:0;width:65px;height:28px;border-radius:14px;background:#ddd;transition:0.3s;}

.reg_box .inp_line .rights .radio_style label .c{ border-radius:100%;background:#fff;position:absolute;left:0;transition:0.3s;width:26px;height:26px;top:0;margin:1px;}

.reg_box .inp_line .rights .radio_style input[type=radio]:checked + label{ background:#3eb3e8;transition:0.3s;} 

.reg_box .inp_line .rights .radio_style input[type=radio]:checked + label .c{ left:37px;transition:0.3s;}


KraothMa
浏览 2536回答 2
2回答

慕斯7606887

把你的代码放到 我的编辑器里 发现可以,  我想是我么的头部不一样!<!DOCTYPE html><html><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />

qq_运着篮球的挨踢侠客丶_0

.reg_box .inp_line .rights   这段去掉.radio_style{ width:65px;height:28px;border-radius:14px;position:relative;float:left;margin:4px 0;box-shadow:0 0 9px rgba(0,0,0,0.15);}
打开App,查看更多内容
随时随地看视频慕课网APP