【问题标题】:Change cursor pointer to a custom icon将光标指针更改为自定义图标
【发布时间】:2021-12-30 23:08:09
【问题描述】:

我想更改cursor 属性以暗示用户需要双击。

除了可以应用的默认图标之外,还有其他图标吗?我在这里看到了一个列表:

W3Schools

但我需要cursor 看起来像带有两个手指的pointer,或者其他更适合双击的图标。

【问题讨论】:

    标签: javascript html css mouse-cursor


    【解决方案1】:

    你基本上可以use any image you want

    使用cursor: url(your-image-path.png), auto;

    div {
       cursor: url(http://65.media.tumblr.com/avatar_91989eab746d_96.png), auto;
    }
    <div>
    Winter is coming
    </div>

    原小提琴:JSFiddle

    如需 IE 支持,您需要 use .cur format

    【讨论】:

      猜你喜欢
      • 2012-02-07
      • 1970-01-01
      • 1970-01-01
      • 2019-05-23
      • 2019-10-06
      • 2017-04-11
      • 2016-04-07
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多