November 2011
Intermediate to advanced
384 pages
13h 23m
English
Apseudo-class is a predefined class that a web browser uses to match a specific type or pattern of elements. In CSS3, the list of pseudo-class names was expanded in two new areas: type and child. The type pseudo-class is described here; the child pseudo-class is discussed in the following section, “Select an HTML Element Using the Structural child Pseudo-Class.”
The structural type pseudo-class matches a series of like elements within a shared parent:
element:first-of-type { ... }element:last-of-type { ... }element:only-of-type { ... }element:nth-of-type(counter) { ... }element:nth-last-of-type(counter) { ... }
The :first-of-type and :last-of-type selectors match the first and last ...
Read now
Unlock full access