<div class="form-table-left" style="width: 100%;"> <span class="span-left">本人承诺提供的信息、材料均合法、真实、有效</span> <span class="span-left checkBox"> <input type="checkBox" name="type" id="adviceRadio1" value="1" checked hidden/> <label for="adviceRadio1" class="advice"></label> </span> </div>
.advice{ width: 15px; height: 15px; display: inline-block; background: url('../../assets/images/checkbox-no.png') no-repeat center; vertical-align: middle; margin-top: -4px; } input[type="checkBox"]:checked + .advice{ background-image: url('../../assets/images/checkbox-yes.png'); }
来源:CSDN
作者:九亿宅男的梦
链接:https://blog.csdn.net/Guoyu1_/article/details/104313881