November 29, 1999 - Changing the Cursor
November 29, 1999 Changing the Cursor Tips: November 1999
Yehuda Shiran, Ph.D.
|
cursor
CSS property. It accepts one of the following values:
Property | Description |
auto | Browser determines which cursor to display based on the current context |
crosshair | Simple cross hair |
default | Platform-dependent default cursor (usually an arrow) |
hand | Hand |
move | Crossed arrows indicating something is to be moved |
dir-resize | Arrow indicating edge is to be moved (dir may be n , ne , nw , s , se , sw , e , or w ) |
text | Editable text (usually an I-bar) |
wait | Hourglass or watch indicating that the program is busy and the user should wait |
help | Arrow with question mark indicating help is available |
If you're using Internet Explorer, pass the mouse over this paragraph. The style of the cursor changes to crosshair
:
<FONT ... STYLE="cursor: crosshair">any text here</FONT>
The cursor
property can be applied to almost any HTML element, including the <BODY>
tag. The cursor
property can also be set in JavaScript:
object.style.cursor = shape;
For example, the following statement changes the cursor anywhere on the page:
document.body.style.cursor = "wait";