Opera and Custom cursor in CSS

☆樱花仙子☆ 提交于 2019-11-27 02:33:08

问题


Where I normally am verry proud of Opera for implementing everything CSS really correct it seems that implementing a custom cursor with the following line doesn't seem to work

cursor:url("../pics/merge.gif");

The URL is correct since it works for regular background-image properties.
Works in other browsers, but not in Opera.

Any ideas?


回答1:


There is a workaround for opera using javascript:

http://plugins.jquery.com/project/customcursor

works ok, tested in opera 11, though I'd recommend usual css approach for other browsers, especially older ie, which are not too fast even without js.




回答2:


Opera has not yet added support for that. That line is incorrect though, per the specification a fallback cursor is required. So you have to write e.g.

cursor:url("path/to/cursor"), wait;

(Disclaimer: I work for Opera.)




回答3:


Opera doesn't seem to support the url property. It might even be being removed from the spec (will check that).




回答4:


the js version is really slow. There is also a filesize limit on the image. https://developer.mozilla.org/en/CSS/cursor is a good place to read about CSS cursors.



来源:https://stackoverflow.com/questions/447038/opera-and-custom-cursor-in-css

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