【问题标题】:Is it possible to remove the hand cursor that appears when hovering over a link? (or keep it set as the normal pointer)是否可以删除悬停在链接上时出现的手形光标? (或将其设置为普通指针)
【发布时间】:2012-02-15 17:33:01
【问题描述】:

我想删除当您将鼠标悬停在超链接上时出现的手形光标。

我已经尝试过这个 css:

a.link {
    cursor: pointer;
}

还有这个:

a.link {
    cursor: pointer !important;
}

当我将鼠标悬停在链接上时,它仍然会变成手。

有没有人知道为什么会发生这种情况,或者有什么解决方案可以让我达到这种效果?

【问题讨论】:

  • 那么你的主播是用“链接”css 类装饰的吗?
  • 你需要使用:hover伪类

标签: css hyperlink mouse-cursor


【解决方案1】:

这正是cursor: pointer; 应该做的。

如果你想让光标保持正常,你应该使用cursor: default

【讨论】:

  • 谢谢,帮我解决了这个问题。我想这取决于我对指针的影响。你知道这有什么样的浏览器支持吗?我正在尝试隐藏指向我的后端部分的链接,所以我希望它始终以这种方式出现......
  • 拥有完整的浏览器支持:you should google more
【解决方案2】:

使用内联样式使用<a href="your link here" style="cursor:default">your content here</a>。 看到这个example

或者使用 css。看到这个example

此解决方案是跨浏览器兼容的。

【讨论】:

    【解决方案3】:
    <button>
      <a href="https://accounts.google.com/ServiceLogin?continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fpc%3Den-ha-apac-in-bk-refresh14&service=mail&dsh=-3966619600017513905"
         style="cursor:default">sign in</a>
    </button>
    

    【讨论】:

      【解决方案4】:

      试试这个

      移除手形光标

      a.link {
          cursor: default;
      }
      

      【讨论】:

        【解决方案5】:
        <style>
        a{
        cursor: default;
        }
        </style>
        

        在上面的代码中,使用了 [cursor:default]。默认是通常出现的箭头光标。

        如果您使用 [cursor:pointer],那么您可以访问当您将鼠标悬停在链接上时出现的手形光标。

        要了解更多关于光标及其外观的信息,请点击以下链接: https://www.w3schools.com/cssref/pr_class_cursor.asp

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2015-06-14
          • 1970-01-01
          • 2021-11-11
          • 1970-01-01
          • 1970-01-01
          • 2018-10-16
          • 1970-01-01
          • 2012-12-15
          相关资源
          最近更新 更多