CSS cursor Property
Example
.alias {
cursor: alias;
}
.auto {
cursor: auto;
}
.context-menu {
cursor: context-menu;
}
.copy {
cursor: copy;
}
.default {
cursor: default;
}
Meaning
The cursor property sets the mouse cursor, if any, to show when the mouse pointer is over an element.
Default value: | auto |
Inherited: | Yes |
Animatable: | No |
Version: | CSS2 |
JavaScript syntax: |
|
Standard Syntax
cursor: value;
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Status
Property Values
The following table describes the values of this property.
Value | Look like | Description |
---|---|---|
General | ||
auto |
The browser determines the cursor to display based on the current context. E.g. equivalent to text when hovering text. This is default. | |
default |
The default cursor for the platform, without regard for the context, typically an arrow. | |
none |
No cursor is rendered. | |
inherit | Sets this property to its default value. | |
inherit | If specified, the associated element takes the computed value of its parent element cursor property. |
|
revert | Reverts the cascaded value of the property from its current value to the value the property | |
revert-layer | Rollback styles to the ones specified in previous cascade layers. | |
unset | Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not. | |
Links & status Cursors | ||
context-menu |
Indicates that a context-menu is available. | |
help |
Indicates that help is available. | |
pointer |
A cursor that Indicates a link, typically a hand with an extended index finger. | |
progress |
A progress indicator. The program is performing some processing but the user can still interact with the interface (unlike for wait ). |
|
wait |
Indicates that the program is busy and the user should wait. | |
Selection Cursors | ||
cell |
Indicates that a cell (or set of cells) can be selected. | |
crosshair |
A simple crosshair. Often used to indicate selection in a bitmap. | |
text |
Indicates text that can be selected, typically an I-beam. | |
vertical-text |
Indicates that vertical text can be selected, a sideways I-beam. | |
Drag and Drop Cursors | ||
alias |
Indicates that an alias or shortcut is to be created. | |
copy |
Indicates that something can be copied. | |
move |
Indicates that the hovered object can be moved. | |
no-drop |
Indicates that the dragged item cannot be dropped at the current location. | |
not-allowed |
Indicates that something cannot be done. | |
Resizing & scrolling Cursors | ||
all-scroll |
Indicates that something can be scrolled in any direction (panned). | |
col-resize |
Indicates that the column can be resized horizontally. | |
row-resize |
Indicates that the row can be resized vertically. | |
n-resize |
Indicates that some edge is to be moved up (north). | |
e-resize |
Indicates that some edge is to be moved right (east). | |
s-resize |
Indicates that some edge is to be moved down (south). | |
w-resize |
Indicates that some edge is to be moved left (west). | |
ne-resize |
Indicates that some edge is to be moved up and right (north/east). | |
nw-resize |
Indicates that some edge is to be moved up and left (north/west). | |
se-resize |
Indicates that some edge is to be moved down and right (south/east). | |
sw-resize |
Indicates that some edge is to be moved down and left (south/west). | |
ew-resize |
Indicates a bidirectional resize cursor. | |
ns-resize |
Indicates a bidirectional resize cursor. | |
nesw-resize |
Indicates a bidirectional resize cursor. | |
nwse-resize |
Indicates a bidirectional resize cursor. | |
Zoom and Grab Cursors | ||
zoom-in |
Indicates that something can be zoomed in. | |
zoom-out |
Indicates that something can be zoomed out. | |
grab |
Indicates that something can be grabbed (dragged to be moved). | |
grabbing |
Indicates that something is grabbed. |
Default CSS Property Values
selectors {
cursor: auto;
}