I've been looking for this for a long time now. All I've found doesn't work for me sadly.
My custom cursor won't work on Firefox, I've a beautiful "Invalid property value". Also in Firefox Developper Edition I've the same error but the cursor is displayed. No problem in Chrome, it's displayed without any error.
There is no problem with my PNG I believe, it's fit all the requierement to be compatible with Firefox.
The code is simple, I don't need to show you more.
body {
cursor: url('cursor.png'), pointer;
}
And the cursor.png
image:
Edit: It's looks like a css rules body:not([id])
is showing up as I inspect element:
This rule is not in my CSS files and I've no idea what it is doing here. Any ideas how to remove it?
Edit 2: Found out that it's NoScript ( add-on ) on Firefox which force this css properties. Can't find a way to remove it though.
The cursor property specifies the mouse cursor to be displayed when pointing over an element.
The cursor CSS property sets the mouse cursor, if any, to show when the mouse pointer is over an element.
You can simply use the CSS cursor property with the value pointer to change the cursor into a hand pointer while hover over any element and not just hyperlink. In the following example when you place the cursor over the list item, it will change into a hand pointer instead of the default text selection cursor.
Answer: Use the CSS cursor property You can define a custom cursor using the CSS cursor property. The cursor property takes the comma-separated list of user-defined cursors value followed by the generic cursor. First of all create cursor image and save it with the extension .
You should add 2 more parameters like this :
cursor: url(cursor2.png) 2 2, pointer;
please read this mozila guide : https://developer.mozilla.org/en-US/docs/Web/CSS/cursor
I had a similar problem. Fixed it by adding "auto
" to the end:
cursor: url('cursor.png'), auto;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With