Prev article
Newer
Next article
Older
See also:
:link
A link.
a:link { background-color: orange; }
<a href="#dynamic-pseudo-classes">A Link</a>
:visited
A link that been visited.
a:visited { background-color: red; }
<a href="visited.html">Click to visit</a>
:hover
The mouse is over the element.
.button:hover, .a:hover { outline: 1pt solid blue; }
<button>Hover me Button</button> <a href="#">Hover me Link</a>
:active
The element is being clicked.
.button:active, .a:active { background-color: green; }
<button>Click and Hold</button> <a href="#">Click and Hold</a>
:focus
The element has the keyboard focus.
.button:focus, .a:focus { background-color: violet; }
<button>Focus me Button</button> <a href="#">Focus me Link</a>
Ads by Google
© Richard McGrath