Open In App

CSS Cursor Property

Last Updated : 01 Apr, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

CSS Cursor is used to specify the mouse cursor to be displayed while pointing to an element. This property is defined with zero or more <url> values that are separated by commas followed by 1 keyword value as mandatory & each <url> will point to the image file.

Try It:

Default
Pointer
Progress
Wait
Text
Crosshair
Move
Not Allowed
East Resize
North East Resize
North West Resize

Hover over this area to see cursor preview

Currently Active Property:

cursor: auto; 

Syntax: 

cursor: value;

CSS Cursor Property Values:

This table provides a structured overview of each cursor property along with its description.

Cursor PropertyDescription
autoDefault property where the browser sets a cursor.
aliasIndicates that something is to be created.
all-scrollIndicates scrolling.
cellIndicates a cell or set of cells are selected.
context-menuIndicates that a context menu is available.
col-resizeIndicates that the column can be resized horizontally.
copyIndicates something is to be copied.
crosshairRenders as a crosshair.
defaultDefault cursor.
e-resizeIndicates an edge of a box is to be moved to the right.
ew-resizeIndicates a bidirectional resize cursor.
helpIndicates that help is available.
moveIndicates something is to be moved.
n-resizeIndicates an edge of a box is to be moved up.
ne-resizeIndicates an edge of a box is to be moved up and right.
nesw-resizeIndicates a bidirectional resize cursor.
ns-resizeIndicates a bidirectional resize cursor.
nw-resizeIndicates an edge of a box is to be moved up and left.
nwse-resizeIndicates a bidirectional resize cursor.
no-dropIndicates that the dragged item cannot be dropped here.
noneIndicates no cursor is rendered for the element.
not-allowedIndicates that the requested action will not be executed.
pointerIndicates a link.
progressIndicates that the program is busy.
row-resizeIndicates that the row can be resized vertically.
s-resizeIndicates an edge of a box is to be moved down.
se-resizeIndicates an edge of a box is to be moved down and right.
sw-resizeIndicates an edge of a box is to be moved down and left.
textIndicates text that may be selected.
URLComma-separated list of URLs to custom cursors.
vertical-textIndicates vertical-text that may be selected.
w-resizeIndicates an edge of a box is to be moved left.
waitIndicates that the program is busy.
zoom-inIndicates that something can be zoomed in.
zoom-outIndicates that something can be zoomed out.
initialSets to its default value.
inheritInherits from its parent element.

Example: This example illustrates the use of the cursor property & its value is set to wait which indicates that the program is busy.

HTML
<!DOCTYPE html>
<html>
<head>
    <title> CSS | cursor property </title>
    <style>
    .wait {
        cursor: wait;
    }
    
    h1 {
        color: green;
    }
    </style>
</head>

<body>
    <center>
        <h1>GeeksforGeeks</h1>
        <p>Mouse over the words to change the mouse cursor.</p>

        <p class="wait">wait</p>

    </center>
</body>
</html>

Output: 
 


Supported Browsers:

  • Google Chrome 1.0
  • Microsoft Edge 12.0
  • Mozilla Firefox 1.0
  • IE 4.0
  • Opera 7.0
  • Safari1.2


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads