CSS 3 Module | <== Test # ==> | |
---|---|---|
W3C Selectors | 109 of 176 | |
Testing | Date | Revision |
NEGATED :contains() pseudo-class (ID #85) | 2001-11-12 | 1.1 |
This paragraph should have a green background.
div.stub *:not(:contains("red")) { background-color: lime; } .red { background-color: red; }
<div class="stub"> <p class="red">This paragraph should have a green background.</p> <ul class="red"> <li>All this list, including bullets</li> <li>and all text, should be green.</li> </ul> </div>