最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Change the cursor to zoom in and zoom out symbol - Stack Overflow

programmeradmin1浏览0评论

I want to know how to change the cursor point to zoom in and zoom out symbol.

I know how to change the cursor to busy, wait and etc,

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

but I don't know how to change the cursor to that for zooming in and out.

I got it by this way

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

I want to know how to change the cursor point to zoom in and zoom out symbol.

I know how to change the cursor to busy, wait and etc,

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

but I don't know how to change the cursor to that for zooming in and out.

I got it by this way

document.manual_production.image1.style.cursor='-moz-zoom-out';
Share edited Feb 8, 2011 at 9:22 Yi Jiang 50.2k16 gold badges138 silver badges136 bronze badges asked Sep 7, 2010 at 7:52 hussainhussain 313 silver badges5 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 4

And for Chrome/Safari/WebKit, there is cursor: -webkit-zoom-in and cursor: -webkit-zoom-out.

Your going to need a cur icon for that:

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

What @sheeks06 is saying is that you need to upload your own cursor image. Google for 'free cursors', wade through the heaps of idiotic animated cursors until you find one you need, upload it to your web server.

url(/path/to/mycursor.cur) means the place you uploaded your cursor.

-moz-zoom will only work in Mozilla Firefox, not in most other browsers.

发布评论

评论列表(0)

  1. 暂无评论