为什么我不能做div:not(.wrapper2 .exception)
? IE浏览器。除.wrapper2 .exception
以外的所有div。无法执行`:not(.foo .bar)`
http://jsfiddle.net/frank_o/4swjmhtr/
HTML:
<div class="wrapper1">
<div>
<p>Hi</p>
</div>
<div class="exception">
<p>Hi</p>
</div>
</div>
<div class="wrapper2">
<div>
<p>Hi</p>
</div>
<div class="exception">
<p>Hi</p>
</div>
</div>
CSS:
div:not(.wrapper2 .exception) {
background: blue;
color: white;
}
不清楚你在问什么。除了'.wrapper2 .exception',或'.wrapper2'和'.exception'之外,你想要的是吗? – Scimonster 2014-09-23 12:13:46
嗨!所有div除'.wrapper2 .exception'是的。谢谢。更新的问题。 – 2014-09-23 12:15:34
这解释了原因:http://stackoverflow.com/questions/7403129/combining-not-selectors-in-css/7403148#7403148 – 2014-09-23 12:20:03