html 部分:
|
css 部分,用提供的图片替换选中和未选中状态
input[type='checkbox']{ width: 20px; height: 20px; background: url("./icon/yuan.png") no-repeat center; background-size:20px 20px ; -webkit-appearance:none; outline: none; } .checkBox input[type=checkbox]:checked{ width: 20px; height: 20px; background: url("./icon/checked.png") no-repeat center; background-size:20px 20px ; -webkit-appearance:none; outline: none; }