The most common event
that occurs is that the user points at or clicks on something. With
the newer browsers (sadly, not Internet Explorer 6 or earlier; at least
not without adding the special JavaScript function, hover.htc), it??™s
easy to make any on-screen object respond to a rollover, which is
the act of moving the pointer over something, also known as hovering.
For example, the :hover pseudo-class can cause a border to
appear around an image when the mouse rolls over the image.
Anchor Link Pseudo-Classes
Pseudo-classes are most commonly used with hyperlinks (a tags),
enabling things like a change in their color or causing their underlining
to be removed when rolled over.
There are four pseudo-classes for anchor links, since links always
are in one of these four states:
??? Link. The link is just sitting there looking like a link and waiting
for someone to click on it.
??? Visited. The user has clicked on the link at some point in the
past.
??? Hover. The link is currently being pointed at (rolled over).
??? Active. The link is currently being clicked.
Here are the corresponding pseudo-class selectors for these states
(using the a selector with some sample declarations):
a:link {color:black;}
a:visited {color:gray;}
a:hover {text-decoration:none;}
a:active {color:navy;}
You can ?¬? nd the hover.htc ?¬? le
in the Javascript folder of the
Stylib CSS library download at
www.
Pages:
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82