【问题标题】:Change the cursor to zoom in and zoom out symbol更改光标以放大和缩小符号
【发布时间】:2011-03-19 02:04:15
【问题描述】:

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

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

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

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

我是这样弄的

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

【问题讨论】:

    标签: javascript html css


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

      你需要一个 cur 图标:

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

      【讨论】:

      • 这个“/path/to/mycursor.cur”的路径是什么
      • document.manual_production.image1.style.cursor='-moz-zoom-out';
      【解决方案3】:

      @sheeks06 的意思是您需要上传自己的光标图像。谷歌搜索“免费光标”,浏览一堆愚蠢的动画光标,直到找到您需要的光标,然后将其上传到您的网络服务器。

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

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

      【讨论】:

      • 感谢您的进一步阐述:)
      • 根据他的问题/cmets,我感觉提问者可能需要一些额外的信息:P
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-08-25
      • 2020-08-26
      • 2015-01-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多