Cursor styles
The cursor CSS property sets the mouse cursor, if any, to show when the mouse pointer is over an element.
The cursor setting should inform users of the mouse operations that can be performed at the current location, including: text selection, activating help or context menus, copying content, resizing tables, and so on. You can specify either the type of cursor using a keyword, or load a specific icon to use (with optional fallback images and mandatory keyword as a final fallback).
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 1 | 12 | 1 | 1.2 | 18 | 13.4 | |
alias | 1 | 12 | 1.5 | 3 | 18 | |
all-scroll | 1 | 12 | 1.5 | 3 | 18 | |
auto | 1 | 12 | 1 | 1.2 | 18 | 13.4 |
cell | 1 | 12 | 1.5 | 3 | 18 | 13.4 |
col-resize | 1 | 12 | 1.5 | 3 | 18 | |
context-menu | 1 | 12 | 1.5 | 3 | 18 | |
copy | 1 | 12 | 1.5 | 3 | 18 | |
crosshair | 1 | 12 | 1 | 1.2 | 18 | |
default | 1 | 12 | 1 | 1.2 | 18 | |
e-resize | 1 | 12 | 1 | 1.2 | 18 | |
ew-resize | 1 | 12 | 1.5 | 3 | 18 | |
grab Grab cursors (`grab` and `grabbing`) | 68 | 14 | 27 | 11 | 68 | |
grabbing | 68 | 79 | 27 | 11 | 68 | |
help | 1 | 12 | 1 | 1.2 | 18 | |
move | 1 | 12 | 1 | 1.2 | 18 | |
n-resize | 1 | 12 | 1 | 1.2 | 18 | |
ne-resize | 1 | 12 | 1 | 1.2 | 18 | |
nesw-resize | 1 | 12 | 1.5 | 3 | 18 | |
no-drop | 1 | 12 | 1.5 | 3 | 18 | |
none | 5 | 12 | 3 | 5 | 18 | |
not-allowed | 1 | 12 | 1.5 | 3 | 18 | |
ns-resize | 1 | 12 | 1.5 | 3 | 18 | |
nw-resize | 1 | 12 | 1 | 1.2 | 18 | |
nwse-resize | 1 | 12 | 1.5 | 3 | 18 | |
pointer | 1 | 12 | 1 | 1.2 | 18 | |
progress | 1 | 12 | 1 | 1.2 | 18 | |
row-resize | 1 | 12 | 1.5 | 3 | 18 | |
s-resize | 1 | 12 | 1 | 1.2 | 18 | |
se-resize | 1 | 12 | 1 | 1.2 | 18 | |
sw-resize | 1 | 12 | 1 | 1.2 | 18 | |
text | 1 | 12 | 1 | 1.2 | 18 | 13.4 |
url `url()` | 1 | 12 | 1.5 | 3 | 18 | 13.4 |
url positioning syntax `url()` positioning syntax | 1 | 79 | 1.5 | 3 | 18 | |
vertical-text | 1 | 12 | 1.5 | 3 | 18 | |
w-resize | 1 | 12 | 1 | 1.2 | 18 | |
wait | 1 | 12 | 1 | 1.2 | 18 | |
zoom-in | 37 | 12 | 24 | 9 | 37 | |
zoom-out | 37 | 12 | 24 | 9 | 37 | |
| Other | ||||||
| The cursor attribute specifies the mouse cursor displayed when the mouse pointer is over an element. | 1 | 12 | 1 | 1.2 | 18 | 1 |
- Starting in Firefox 67, the maximum size allowed for custom cursors is 32x32 pixels due to cursors being misused by certain malicious sites.
- This property is only supported on iPads with an external pointing device.
- Unsupported values use the `default` pointer as a fallback.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- This cursor is only supported on macOS and Linux.
- This cursor is only supported on macOS and Linux.
- This cursor is only supported on macOS and Linux.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- Chrome also continues to support the prefixed versions.
- Available with a vendor prefix: -webkit- (1)
- Chrome 22 added Windows support.
- Available with a vendor prefix: -moz- (1.5)
- Available with a vendor prefix: -webkit- (4)
- Chrome Android also continues to support the prefixed versions.
- Available with a vendor prefix: -webkit- (18)
- Chrome Android 25 added Windows support.
- If this value is used, the iPad will display the `default` pointer instead.
- Available with a vendor prefix: -webkit- (1)
- Chrome 22 added Windows support.
- Available with a vendor prefix: -webkit- (79)
- Edge 79 added Windows support.
- Available with a vendor prefix: -webkit- (18)
- Chrome Android 25 added Windows support.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- Firefox 4 added macOS support.
- Firefox 4 added macOS support.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- If this value is used, the iPad will display the `default` pointer instead.
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -moz- (1)
- Available with a vendor prefix: -webkit- (3)
- Available with a vendor prefix: -webkit- (18)
- If this value is used, the iPad will display the `default` pointer instead.
- Available with a vendor prefix: -webkit- (1)
- Available with a vendor prefix: -moz- (1)
- Available with a vendor prefix: -webkit- (3)
- Available with a vendor prefix: -webkit- (18)
- If this value is used, the iPad will display the `default` pointer instead.
- Starting in Firefox 67, the maximum size allowed for custom cursors is 32x32 pixels due to cursors being misused by certain malicious sites.
Syntax
.clickable { cursor: pointer; }
.draggable { cursor: grab; }
.dragging { cursor: grabbing; }
.disabled { cursor: not-allowed; } Live demo
Use cases
-
Affordance hints
Reinforce clickable, draggable, or zoomable behavior with the expected pointer style.
-
Unavailable actions
Support disabled or blocked states with a pointer cue that matches the visual styling.
Cautions
- Cursor styling alone does not create semantics or behavior, so it should not replace real interactive elements.
- Exotic custom cursors can harm clarity and feel gimmicky if overused.
Accessibility
- Some users never see pointer changes, so interaction cues must also be visible in text, shape, and state styling.