2016-06-19 2 views

ответ

5

Объединить два :not() селекторов, так же, как селектор для .class-a И .class-b является .class-a.class-b.

:not(h1):not(figure) > a { 
 
    color: red; 
 
}
<h1><a>Test</a></h1> 
 
<p><a>Test</a></p> 
 
<figure> 
 
    <a>Test</a> 
 
</figure>

4

Используйте это, чтобы объединить несколько :not() селекторов:

:not(h1):not(figure) > a { 
 
    background: #859900; 
 
}
<h1> 
 
    <a href="http://stackexchange.com">Stack Exchange</a> 
 
</h1> 
 
<figure> 
 
    <a href="http://stackexchange.com">Stack Exchange</a> 
 
</figure> 
 
<h2> 
 
    <a href="http://stackexchange.com">Stack Exchange</a> 
 
</h2>

Смежные вопросы