更改光标以放大和缩小符号

时间:2010-09-07 07:52:27

标签: javascript html css

我想知道如何更改光标点以放大和缩小符号。

我知道如何将光标更改为忙,等等等,

document.manual_production.style.cursor='wait';

但我不知道如何将光标更改为放大和缩小光标。

我是这样得到的

document.manual_production.image1.style.cursor='-moz-zoom-out';

3 个答案:

答案 0 :(得分:4)

对于Chrome / Safari / WebKit,有cursor: -webkit-zoom-incursor: -webkit-zoom-out

答案 1 :(得分:3)

你需要一个cur图标:

document.manual_production.style.cursor = 'url(/path/to/mycursor.cur) 0 0, pointer';

答案 2 :(得分:1)

@ sheeks06所说的是你需要上传你自己的光标图像。谷歌的“免费游标”,通过大量愚蠢的动画游标,直到找到你需要的游标,然后将其上传到你的网络服务器。

url(/path/to/mycursor.cur)表示您上传光标的位置。

-moz-zoom仅适用于Mozilla Firefox,而不适用于大多数其他浏览器。

相关问题