cursor" CSS property is responsible for the appearance of the cursor. They can be set to look from predefined names of cursors, and you can display the cursor from a file.
The type of cursor can be set using a value - name, for example, a cursor with a question mark:
Full list of cursor values
Mobile browsers do not support the
cursor property, but in jQuery, the clik event will not fire if the element does not have a
cursor: pointer property.
Setting your cursor
All browsers allow you to set your cursor to an element from a file by URL, for example:
cursor: url('/pointer.cur') 4 1;
The second parameter sets the coordinates of the active point at which the mouse click is registered. By default, this is the upper left corner (0,0).
An example in action:
Since, browsers have different support for cursor file formats:
- Internet Explorer supports CUR and ANI as the cursor file format.
- Firefox, Chrome, Safari support CUR, PNG, GIF, JPG formats.
The cursor property has the ability to specify multiple cursors, the priority will be the first supported format in the list.
url('/pointer.png') 4 1,
url('/pointer.cur') 4 1,