Sams Teach Yourself CSS in 10 Minutes

The five pseudo-classes have the same weight, so the order in which they are placed within a CSS file is important. Pseudo-class declarations that appear later in a CSS file will override those that appear earlier. The correct order is shown in Listing 10.2.

Listing 10.2. CSS Code Containing Correct Order of <a> Pseudo-Classes

a {...} a:link {...} a:visited {...} a:focus {...} a:hover {...} a:active {...}

Категории