Prev | Current Page 128 | Next

Tommy Olsson and Paul O'Brien

"The Ultimate CSS Reference"


CSS3 promises an even greater range of powerful pseudo-classes (p. 90).
Remember that pseudo-classes, like ID selectors (p. 65) and attribute selectors
(p. 67), act like modifiers on type selectors (p. 62) and the universal selector (p. 60):
they specify additional constraints for the selector pattern, but they don??™t specify
other elements. For instance, the selector li:first-child matches a list item that??™s
the first child of its parent; it doesn??™t match the first child of a list item.
A simple selector can contain more than one pseudo-class if the pseudo-classes
aren??™t mutually exclusive. For example, the selectors a:link:hover and
a:visited:hover are valid, but a:link:visited isn??™t because :link and :visited
are mutually exclusive. An element is either an unvisited link or a visited link.
Selector Reference
The Ultimate CSS Reference 82
The order of declaration is very important for the dynamic pseudo-classes :hover,
:focus, and :active, depending on what you wish to achieve.


Pages:
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140