更新时间:2023-12-01 23:50:10
很遗憾,css 不支持父选择器.:(
所以唯一的方法就是使用像 jQuery 父方法这样的 javascript.
Unfortunately css doesn't support parent selectors. :(
So the only way to do it is to use javascript like the jQuery parent method.
更新:CSS 选择器 Level 4 将支持父选择器!http://www.w3.org/TR/selectors4/#subject
Update: CSS Selectors Level 4 will support parent selectors! http://www.w3.org/TR/selectors4/#subject