In this section, we will learn what the cursor property is and how to use it in CSS.
Mouse Pointer in CSS: CSS cursor Property Definition and Usage
The CSS `cursor` property is used to change the shape of the mouse cursor.
Basically, when you have an element and want the mouse cursor (AKA pointer) to have another shape when it comes to the boundary of that element, we can use the `cursor` property.
CSS cursor Property Syntax
Cursor Type in CSS: CSS cursor Property Value
Here’s the list of values we can use for this property.
Note: the best way to see the result of using these values for this property is to check the live demo we’ve created at the beginning of this section.
Example: cursor pointer in CSS
How Does CSS cursor Property Work?
For this example, we’ve set the cursor property to “wait” and so when the mouse pointer enters the boundary of the div element, it will take the shape of waiting cursor.