2.5. Other design techniques using the CSS style

2.5.1. Changing the cursor shape with CSS

It is sometimes useful to alter the browser’s environment. For example, you may want to change the browser’s cursor when the mouse passes over a given element. To change the shape of a cursor with CSS is easy: all you need is to define the style attribute with the cursor keyword. The following are the 16 frequently used cursor shapes defined in CSS1:

   cursor:auto         cursor:n-resize      cursor:crossbar      cursor:se-resize
   cursor:default      cursor:sw-resize     cursor:hand          cursor:s-resize
   cursor:move         cursor:w-resize      cursor:e-resize      cursor:text
   cursor:ne-resize    cursor:wait          cursor:nw-resize     cursor:help

Consider the following example page ex02-21.htm:

Example. ex02–21.htm ...

Get Practical Web Technologies now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.