CSS Cookbook, 2nd Edition
Problem
You want to change the cursor to an icon representation of a timepiece when the mouse pointer rolls over a link, as in Figure 6-4. Figure 6-4. The cursor changes to a timepiece
Solution
Use the cursor property to change the cursor: a:link, a:visited { cursor: move; }
Discussion
The cursor property can take multiple values, as listed in Table 6-2. However, support for these values varies from browser to browser. Opera 7 and Internet Explorer for Windows 5.5+ support the cursor property. Although Netscape Navigator 6+ supports most values, the browser doesn't support the uri. Also, in Navigator, the cursor property isn't inherited to child elements from the parent.
The code to include a custom cursor is similar to that used to set a background image on an element: a.help:link, a.help:visited{ cursor: url(bewildered.gif); } While employing different cursors, most users will find changes to their routine surfing habits somewhere between a whimsical annoyance and an extreme aggravation, depending on how excessive your implementation is. Therefore, change the cursor a user is accustomed to seeing at your own risk. See Also
The CSS 2.1 specification for the cursor property at http://www.w3.org/TR/CSS21/ui.html#propdef-cursor; and examples of the various cursors in action at http://www.zimmertech.com/tutorials/css/20/changing-cursors-tutorial.php. |
Категории