Appearance:
cursor: <value>
Possible Values:
auto | crosshair | default | move | hand | help | text | wait | n-resize | s-resize | e-resize | w-resize | ne-resize | nw-resize | se-resize | sw-resize
Initial Value:
default
Applies to:
All elements
Inherited:
No
With style sheets, you can change the cursor when the mouse moves over an area or a link
You can replace "value" with the type of cursor you want. So, let's say you want a crosshair (looks like a cross) when someone moves over a link. You add the style="cursor:crosshair" attribute to the link tag:
Example:
<A HREF="#" style="cursor:crosshair">A Cross Link</A>
This would give us the following link, move your mouse over it to try it out:
A Cross Link
You can do it over text as well. You can define a class or just drop it inline with a span tag:
Example:
<SPAN style="cursor:wait">Should You Wait for This?</SPAN>
This will give us the old hourglass as if we are waiting on something when we mouse over the text. Try it out below:
Should You Wait for This?
There are some other cursor types as well. Here is a list of the other types of cursors you can use, move your mouse over the text on the right side to see the example:
- auto Shows it according to how the viewer has it set (plain)
- crosshair Looks like a cross
- default Makes the cursor stay the same
- move Looks like you should be moving something
- hand The hand you usually see over links
- pointer The hand you usually see over links (cross browser)
- help A question mark beside the arrow
- text The bar you see when the mouse is over text
- wait The "waiting" hourglass!
- n-resize An arrow- North
- s-resize An arrow- South
- e-resize An arrow- East
- w-resize An arrow- West
- ne-resize An arrow- NorthEast
- nw-resize An arrow- NorthWest
- se-resize An arrow- SouthEast
- sw-resize An arrow- SouthWest