【问题标题】:How can I change mouse pointer icon on a web page?如何更改网页上的鼠标指针图标?
【发布时间】:2023-03-07 07:32:01
【问题描述】:

当我将鼠标指针悬停在普通文本上时,是否有任何方法可以使用 javascript(或任何其他方法)更改鼠标指针图标,我希望它看起来像一只手,就像网页上的链接一样。

【问题讨论】:

    标签: javascript icons hover mouse webpage


    【解决方案1】:

    http://www.w3schools.com/cssref/pr_class_cursor.asp

    使用css:

    div { 光标:指针; }

    【讨论】:

      【解决方案2】:

      查找css属性cursor

      这是最好的方法。

      【讨论】:

        【解决方案3】:

        你可以这样使用:

        onmouseover="this.style.cursor = 'hand';" //on mouse over onmouseout="this.style.cursor = 'auto';" // on mouse out

        【讨论】:

          猜你喜欢
          • 2013-09-24
          • 1970-01-01
          • 2016-06-15
          • 2012-04-26
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2011-06-01
          • 1970-01-01
          相关资源
          最近更新 更多