English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

CSS Basic Tutorial

CSS Box Model

CSS3Basic Tutorial

CSS Reference Manual

CSS @rule (RULES)

CSS Cursors (Cursors)

CSS cursor properties are used to define the cursor type (i.e., mouse pointer) when the mouse is over a certain area or a link on a webpage.

Change the appearance of the cursor

Browsers typically display the mouse pointer over any blank part of a web page, a glove on any link or clickable item, and the editing cursor over any text or text field. Using CSS, you can redefine these properties to display various different cursors.

Browser1 {
    cursor: move;
}
p {
    cursor: text;
}
Test and see‹/›

The following demonstrates the different cursors most browsers will accept. Place the mouse pointer over the 'TEST' link in the output column to display the cursor.

ViewValueExampleView
defaulta:hover{cursor:default;}Test
pointera:hover{cursor:pointer;}Test
texta:hover{cursor:text;}Test
waita:hover{cursor:wait;}Test
helpa:hover{cursor:help;}Test
progressa:hover {cursor: progress;}Test
crosshaira:hover {cursor: crosshair;}Test
movea:hover {cursor: move;}Test
url()a:hover {cursor: url("custom.cur"), default;}Test

ViewMore Cursors»

Create Custom Cursor

can also have a completely custom cursor.

cursor property handles a comma-separated list of user-defined cursor values followed byStandard Cursor. If the first cursor specified is incorrect or cannot be found, the next cursor in the comma-separated list will be used, and so on, until an available cursor is found.

If there is no valid user-defined cursor or it is not supported by the browser, the standard cursor at the end of the list will be used.

Tip:The standard format for cursors that can be used is the .cur format. However, you can use online free image converter software to convert images such as .jpg and .gif to .cur format.

a {
    cursor: url("custom.gif"), url("custom.cur"), default;
}
Test and see‹/›

In the above example, custom.gif and custom.cur are custom cursor files uploaded to your server space, and default is the standard cursor. If the custom cursor is missing or the browser of the viewer does not support it, the standard cursor will be used.

Warning:If you want to declare a custom cursor, you must define one at the end of the listStandard CursorOtherwise, the custom cursor will not be displayed correctly.

This is a live demonstration of a custom cursor.

Note: IE9Supports only .cur static cursor and .ani animation cursor URLs in earlier versions. However, browsers like Firefox, Chrome, and Safari support .cur, .png, .gif, and .jpg, but not .ani.