Cursor : Invalid property value

岁酱吖の 提交于 2019-12-07 02:22:53

问题


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.


回答1:


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




回答2:


I had a similar problem. Fixed it by adding "auto" to the end:

cursor: url('cursor.png'), auto;


来源:https://stackoverflow.com/questions/37307284/cursor-invalid-property-value

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!