CSS 3 Module | <== Test # ==> | |
---|---|---|
W3C Selectors | 2 of 19 of the interactive tests category | |
Testing | Date | Revision |
:hover pseudo-class on links (ID #18a) | 2004-02-29 | 1.0 |
NOTE: User interaction is required for this test.
The background color of this anchor (here) should turn to green when the pointing device hovers over it.
The background color of this anchor (here) should remain green when you hover it.
The background color of this anchor (here) should remain green when the pointing device hovers over it (do not follow that link).
p { color: navy; } .a a:hover { background: green; color: white; } .b a:hover { background: red; color: yellow; } .b a:link { background: green; color: white; } .c :link { background: green; color: white; } .c :visited:hover { background: red; color: yellow; }
<p class="a">The background color of <a href="#foo">this anchor (<strong>here</strong>)</a> should turn to green when the pointing device hovers over it.</p> <p class="b">The background color of <a href="#foo">this anchor (<strong>here</strong>)</a> should <strong>remain green when you hover it</strong>.</p> <p class="c">The background color of <a href="http://link.example.com/">this anchor (<strong>here</strong>)</a> should <strong>remain green when the pointing device hovers over it</strong> (do not follow that link).</p>