【发布时间】:2015-06-04 22:20:38
【问题描述】:
I working on some functionality at the moment, that mask a radio input to look like coloured square, when a radio is selected the sibling label background should change colour, what is happening though is whatever radio button I check, the first label总是变色,这是我的小提琴,
http://jsfiddle.net/heZBT/3622/
我认为这段代码足以进行正确的标签更改,
input:checked + label {
background:yellow;
}
我尝试的一切只会在选中任何单选时使第一个单选兄弟标签变为黄色。
【问题讨论】:
标签: html css radio-button