<strong>如果觉得设置样式太麻烦,或者页面上选中的样式太复杂,也可以用背景图去修改样式</strong><br /><strong><div class=""></strong><br /><strong>    <label><input type="radio" name="1"><i class="spot"></i>123456</label></strong><br /><strong>    <label><input type="radio" name="1"><i class="spot"></i>123456</label></strong><br /><strong></div><br /></strong>
<strong><style></strong><br /><strong>    label{</strong><br /><strong>        display:inline-block;</strong><br /><strong>        width:200px;</strong><br /><strong>        height:50px;</strong><br /><strong>        line-height:.8rem;</strong><br /><strong>        text-align:left;</strong><br /><strong>        position: relative;</strong><br /><strong>    }</strong><br /><strong>    label input{</strong><br /><strong>        width: 15px;</strong><br /><strong>        height: 15px;</strong><br /><strong>        vertical-align: bottom;</strong><br /><strong>        margin-right:.1rem;</strong><br /><strong>        opacity: 0;</strong><br /><strong>    }</strong><br /><strong>    .spot{</strong><br /><strong>        display:inline-block;</strong><br /><strong>        width:17px;</strong><br /><strong>        height:17px;</strong><br /><strong>        background:url("image/radio.png") no-repeat;  /*默认的样式图片*/</strong><br /><strong>        background-size:16px;</strong><br /><strong>        position: absolute;</strong><br /><strong>        top:.2rem;</strong><br /><strong>        left:0;</strong><br /><strong>        z-index:5;</strong><br /><strong>    }</strong><br /><strong>    input:checked + .spot{</strong><br /><strong>        background:url("image/checked.png") no-repeat;  /*选中后的样式图片*/</strong><br /><strong>        background-size:16px;</strong><br /><strong>    }</strong><br /><strong></style></strong>
<strong> </strong>