<span class='radio'>Place holder for Radio1</span>
<input checked type=radio name='radio' class='radio'>
<span class='radio'>Place holder for Radio2</span>
<input type=radio name='radio' class='radio'>
在这种情况下,我只希望<span>
与相应的单选按钮相关联是可见的,但是......
* {
visibility:hidden
}
.radio + .radio:checked {
visibility:visible;
}
不起作用,而这样做:
* {
visibility:hidden
}
.radio:checked + .radio {
visibility:visible;
}
那么为什么我不能选择和操作与前一个相邻兄弟相关的 css 呢?