CSS 3 Module | <== Test # ==> | |
---|---|---|
W3C Selectors | 82 of 176 | |
Testing | Date | Revision |
NEGATED :target pseudo-class (ID #66) | 2001-11-13 | 1.1 |
NOTE: User interaction is required for this test.
This paragraph should be unstyled. The background of the following paragraph should become green when you follow this link.
This paragraph should initially be unstyled. It should become green when you select the link above. When you select this link, it should return to being unstyled and the background of the paragraph below should become green.
This paragraph should initially be unstyled. It should become green when you select the link above. When you follow this link, the three paragraphs should all return to being unstyled.
p { background-color: lime; } p:not(:target) { background-color: transparent; }
<p id="first">This paragraph should be unstyled. The background of the following paragraph should become green when you follow <a href="#second">this link</a>.</p> <p id="second">This paragraph should initially be unstyled. It should become green when you select the link above. When you select <a href="#third">this link</a>, it should return to being unstyled and the background of the paragraph below should become green.</p> <p id="third">This paragraph should initially be unstyled. It should become green when you select the link above. When you follow <a href="#missing">this link</a>, the three paragraphs should all return to being unstyled.</p>