Change cursor on web page

I am trying to change the cursor to a .gif image. Not only one link will be shown on the entire page. I made it like

<style type="text/css">
body {
cursor:url(Butterfly.gif);
}
</style>

he does not work. I also have a file .cur. It works on IE, but not on Firefox.

+3
source share
3 answers

You must add a backup, for example

body {
  cursor: url(Butterfly.gif), url(Butterfly.ani), auto;
  /*                                            ^^^^^^ 
                                                compulsory, according to CSS 2.1
   */
}

See https://developer.mozilla.org/en/Using_URL_values_for_the_cursor_property for more details .

+6
source

If you insist, you should use the file .curfor Internet Explorer.

Internet Explorer 8 URI .CUR .ANI. ( .CUR,.PNG,.GIF .JPG, .ANI.) , Windows , 32 x 32 , , .

http://reference.sitepoint.com/css/cursor

, .

+1

You can use the absolute path ( http://www.example.com/images/Butterfly.gif) to make sure that it works at all, instead of the relative path ( Butterfly.gif).

0
source

Source: https://habr.com/ru/post/1761950/


All Articles