asp.net.ph

Skip Navigation Links

cursor Attribute | cursor Property

CSS Attributes Index   Pseudo-class Attributes


Sets or retrieves the type of cursor to display as the mouse pointer moves over the object.

Syntax


CSS { cursor: 'auto' | 'crosshair' | 'default' | 'hand' | 'move' | 'e-resize' | 'ne-resize' | 'nw-resize' 'n-resize' | 'se-resize' | 'sw-resize' | 's-resize' | 'w-resize' | 'text' | 'wait' | 'help' }
Script object.style.cursor = sCursor ]

Possible Values


auto Browser determines the 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.
*-resize Arrow indicating edge is to be moved ( * may be n, ne, nw, s, se, sw, e, or w—each representing a compass direction ).
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.

The property is read/write with a default value of auto; the CSS attribute is inherited.

Example

The following examples demonstrate use of inline event handlers to dynamically set the type of the cursor as the mouse pointer moves over an element. Both methods yield the same effect.

The sample below uses calls to an embedded stylesheet to set the cursor to hand as the cursor passes over all paragraphs.

<style>
   p { cursor: hand }
</style>

This feature requires Microsoft® Internet Explorer® 4.0 or later.

 Show me 

The sample below uses inline event handlers to dynamically set the cursor to hand as the cursor passes over the paragraph.

<P onmouseover="this.style.cursor='hand'">

This feature requires Microsoft® Internet Explorer® 4.0 or later.

 Show me 



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note