Jquery 如何使用css3更改复选框和收音机的背景色?
如何使用css3更改复选框和收音机的背景色Jquery 如何使用css3更改复选框和收音机的背景色?,jquery,html,css,Jquery,Html,Css,如何使用css3更改复选框和收音机的背景色 <input type="checkbox" name="genre" id="check-1" value="" width="20" height="20" style="width:20px; height:20px; float:left;background: red;"> <label style="width:20px; height:20px; float:left;background: red;">
<input type="checkbox" name="genre" id="check-1" value="" width="20" height="20" style="width:20px; height:20px; float:left;background: red;">
<label style="width:20px; height:20px; float:left;background: red;">
<input type="checkbox" name="genre" id="check-1" value="" width="20" height="20">
</label>
如何使用css3更改复选框和收音机的背景色?
<input type="checkbox" name="genre" id="check-1" value="" width="20" height="20" style="width:20px; height:20px; float:left;background: red;">
<label style="width:20px; height:20px; float:left;background: red;">
<input type="checkbox" name="genre" id="check-1" value="" width="20" height="20">
</label>
复选框没有背景颜色属性。您可以将其包装在某个div标记中,并为该div指定背景色
<div style="height:100%;float:left;background-color: red;" class="evenRow">
<input type="checkbox" name="genre" id="check-1" value="" width="20" height="20" style="width:20px; height:20px; float:left;">
</div>
我没有你想要的确切答案,但我有一个解决方案 你可以继续,你创建你的主题,然后你将下载它作为一个zip。 你会找到帮助的 希望这对你有帮助
li:not(#foo) > fieldset > div > span > input[type='radio'],
li:not(#foo) > fieldset > div > span > input[type='checkbox'] {
/* Hide the input, but have it still be clickable */
opacity: 0;
float: left;
width: 18px;
}
li:not(#foo) > fieldset > div > span > input[type='radio'] + label,
li:not(#foo) > fieldset > div > span > input[type='checkbox'] + label {
margin: 0;
clear: none;
/* Left padding makes room for image */
padding: 5px 0 4px 24px;
/* Make look clickable because they are */
cursor: pointer;
background: url(off.png) left center no-repeat;
}
/*
Change from unchecked to checked graphic
*/
li:not(#foo) > fieldset > div > span > input[type='radio']:checked + label {
background-image: url(radio.png);
}
li:not(#foo) > fieldset > div > span > input[type='checkbox']:checked + label {
background-image: url(check.png);
}
可能存在的副本