Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html, css - cursor - how to change default image for pointer

I need to change the default image for cursor: pointer with some custom image.

To create a class and specify the hover value for cursor is not a valid solution since I would have to add that class to all elements already made and is you know... not exactly optimal. Also can't add that class to body since the children with cursor: pointer would overwrite it.

Any idea how to do that?

like image 469
zozo Avatar asked Sep 11 '12 11:09

zozo


1 Answers

You can create a custom cursor for the body element, which will, unless overridden by later selectors, serve to act as a default:

body {
    cursor: URL(images/cursorimage.cur); /* IE */
    cursor: URL(images/cursorimage.gif);
}
like image 91
David Thomas Avatar answered Oct 10 '22 04:10

David Thomas