CSS中的Opera和Custom光标

时间:2022-12-30 22:55:23

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

我通常对Opera感到自豪,因为它实现了CSS真正正确的一切,似乎用以下行实现自定义游标似乎不起作用

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.

该URL是正确的,因为它适用于常规背景图像属性。适用于其他浏览器,但不适用于Opera。

Any ideas?

4 个解决方案

#1


There is a workaround for opera using javascript:

使用javascript有一个opera的解决方法:

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.

工作正常,在Opera 11中测试,虽然我建议其他浏览器采用通常的css方法,尤其是老版本,即使没有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.

Opera尚未增加对此的支持。但该行不正确,根据规范,需要后备光标。所以你必须写例如

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

(Disclaimer: I work for Opera.)

(免责声明:我为Opera工作。)

#3


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

Opera似乎不支持url属性。它甚至可能被从规范中删除(将检查)。

#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.

js版本真的很慢。图像上还有文件大小限制。 https://developer.mozilla.org/en/CSS/cursor是阅读CSS游标的好地方。

#1


There is a workaround for opera using javascript:

使用javascript有一个opera的解决方法:

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.

工作正常,在Opera 11中测试,虽然我建议其他浏览器采用通常的css方法,尤其是老版本,即使没有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.

Opera尚未增加对此的支持。但该行不正确,根据规范,需要后备光标。所以你必须写例如

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

(Disclaimer: I work for Opera.)

(免责声明:我为Opera工作。)

#3


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

Opera似乎不支持url属性。它甚至可能被从规范中删除(将检查)。

#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.

js版本真的很慢。图像上还有文件大小限制。 https://developer.mozilla.org/en/CSS/cursor是阅读CSS游标的好地方。