html
<input type="radio" name="pay" value="1">
<input type="radio" name="pay" value="2">
css
//选中的
input:checked {
position: relative;
&::before {
content: '';
width: 20px;
height: 20px;
position: absolute;
left: -10px;
top: -8px;
background: url('../assets/images/xuanzhong.gif') no-repeat center center;
}
}
//未选中的
input {
position: relative;
&::before {
content: '';
width: 20px;
height: 20px;
position: absolute;
left: -10px;
top: -8px;
background: url('../assets/images/weixuan.png') no-repeat center center;
}
}