<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>改变input框checked样式</title>
</head>
<style>
label input{display: none;}
label input + span{
width: 20px;
height: 20px;
display: block;
background: gray;
}
label input:checked + span{
background: blue;
}
</style>
<body>
<label for='item'>
<input type="checkbox" id="item" />
<span></span>
</label>
</body>
</html>