/* ==默认状态效果== */ .custom-checkbox label { background: url(images/checkbox.gif) no-repeat; } .custom-radio label { background: url(images/button-radio.png) no-repeat; } .custom-checkbox label, .custom-radio label { background-position: 0px 0px; }
/*==鼠标悬停和得到焦点状态==*/ .custom-checkbox label.hover, .custom-checkbox label.focus, .custom-radio label.hover, .custom-radio label.focus { /*background-position: -10px -114px;*/ } /*==选中状态==*/ .custom-checkbox label.checked, .custom-radio label.checked { background-position: 0px -47px; } .custom-checkbox label.checkedHover, .custom-checkbox label.checkedFocus { /*background-position: -10px -314px;*/ } .custom-checkbox label.focus, .custom-radio label.focus { outline: 1px dotted #ccc; }结尾:总之,我是完美的解决了我的问题,顺便截图发一个看看