- Home
- /
- CSS Cursors
CSS Tutorial
Introduction
CSS Properties
CSS Designing
CSS Advance Topics
CSS FAQs
- Home
- /
- CSS Cursors
CSS Cursors
The cursor property in CSS is used to define the appearance of the mouse pointer when hovering over an element. It’s commonly combined with :hover to give users a better visual experience.
Syntax
selector {
cursor: value;
}
You can use predefined keywords like pointer, move, text, and many more to change the cursor style.
Basic Cursor Types
Pointer Cursor
Text Cursor
Move Cursor
Wait Cursor
Not Allowed Cursor
Zoom In Cursor
Explanation: When you hover over each box, the mouse pointer changes to a different style depending on the assigned class.
Other Common Cursor Values
Here are more cursor options you can explore:
defaultcrosshairhelpgrab/grabbingcol-resize,row-resizee-resize,n-resize,ne-resize, etc.no-dropprogress
Each one gives a different visual feedback depending on the interaction purpose.
Custom Cursor Image
You can even use your own image as a cursor!
Hover Me for Custom Cursor
Note: Make sure your custom image is small (like 32×32 pixels) and in .png format with transparency for best results.
Combine with :hover for Better UX
button:hover {
cursor: pointer;
background-color: #3498db;
}
This makes buttons feel interactive and more intuitive to click.