‚ < ‚ Day Day Up ‚ > ‚ |
Recipe 3.4 Changing CursorsProblemYou want to change the cursor when the mouse pointer rolls over a link, as in Figure 3-3. Figure 3-3. The wait cursor represented by a watch iconSolutionUse the cursor property to change the cursor: a:link, a:visited { cursor: move; } DiscussionThe cursor property can take multiple values, as listed in Table 3-2. However, support for these values varies from browser to browser. Opera 7 and Internet Explorer for Windows 5.5+ support the cursor property. While 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. Table 3-2. Cursor property values and their descriptions
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(/books/3/26/1/html/2/bewildered.gif); } While employing different cursors most users will find changes to their routine surfing habits between a whimsical annoyance and an extreme aggravation, depending on how excessive your implementation is. (This reaction can be noted as being similar to the use of the blink property in Recipe 3.7.) Therefore, change the cursor a user is accustomed to seeing at your own risk. See AlsoThe CSS 2.1 specification for the cursor property at http://www.w3.org/TR/CSS21/ui.html#propdef-cursor. |
‚ < ‚ Day Day Up ‚ > ‚ |