是否可以删除悬停在链接上时出现的手形光标? (或将其设置为普通指针)

时间:2012-01-21 13:52:09

标签: css hyperlink cursor

我想删除将鼠标悬停在超链接上时显示的手形光标。

我试过这个css:

a.link {
    cursor: pointer;
}

而且:

a.link {
    cursor: pointer !important;
}

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

有没有人对于为什么会发生这种情况有任何想法,或者是一种可以让我实现这种效果的解决方案?

5 个答案:

答案 0 :(得分:135)

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

如果您希望光标保持正常,则应使用cursor: default

答案 1 :(得分:13)

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

或者使用css。请参阅此example

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

答案 2 :(得分: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>

答案 3 :(得分:2)

试试这个

删除手形光标

a.link {
    cursor: default;
}

答案 4 :(得分:0)

<style>
a{
cursor: default;
}
</style>

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

如果您使用[光标:指针],则可以访问将鼠标悬停在链接上时出现的指针之类的指针。

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