在Firefox中使用Javascript自定义光标 [英] Custom cursor using Javascript in Firefox

查看:60
本文介绍了在Firefox中使用Javascript自定义光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用onmouseover事件将光标更改为自定义.cur图像。

onMouseOver =" this.style.cursor =''icons / cursor.cur' ';"

以上代码在IE中运行良好,但在Firefox中运行不正常。用户知道他们可以点击的位置非常重要。

有人可以帮忙吗?

I''m trying to use an onmouseover event to change the cursor to a custom .cur image.
onMouseOver="this.style.cursor=''icons/cursor.cur'';"
The above code works fine in IE but not in Firefox. It''s important the users know where they can click.
Could anyone help please?

推荐答案

你可以使用:
you might use:
展开 | 选择 | Wrap | 行号


因为IE像其他一切一样错了。它应该是:

this.style.cursor =" url(icons / cursor.cur)" ;;


和onmouseover应该是小写的xhtml,至少。
Because IE does it wrong like everything else. It should be:
this.style.cursor = "url(icons/cursor.cur)";

And onmouseover should be lower case in xhtml, at least.


感谢回复 drhowarddrfine 但我在来之前尝试了这段代码。我再试一次,但似乎仍然无法工作。我看到你在路径上放了双引号来找到光标。由于 onmouseover 引用引号会导致问题吗?
Thanks for the reply drhowarddrfine but I did try that code before I came here. I''ve tried it again and it still doesn''t seem to work. I see you''ve put double quotes around the path to find the cursor. Since onmouseover goes in quotes could that cause a problem?


这篇关于在Firefox中使用Javascript自定义光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆