CSS: how to select parent's sibling
This question already has an answer here:
You cannot do that with CSS but
You can try using jQuery
$("#showCheckbox").click(function(){
$(this).parent().siblings().show();
});
You can't do it with CSS alone, you need to use javascript
for this. As You need to catch the change event of the checkbox.
上一篇: 选择单选按钮时更改单选按钮标签的颜色?
下一篇: CSS:如何选择父母的兄弟姐妹