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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8953485/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 02:43:44  来源:igfitidea点击:

Is it possible to remove the hand cursor that appears when hovering over a link? (or keep it set as the normal pointer)

csshyperlinkcursor

提问by Craig van Tonder

I would like to remove the hand cursor that appears when you hover over a hyperlink.

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

I have tried this css:

我试过这个css:

a.link {
    cursor: pointer;
}

And this:

和这个:

a.link {
    cursor: pointer !important;
}

And still it changes to the hand when I hover over the link.

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

Does anyone have any ideas as to why this happens or a solution that would enable me to achieve this effect?

有没有人对为什么会发生这种情况或使我能够实现这种效果的解决方案有任何想法?

回答by bevacqua

That's exactly what cursor: pointer;is supposed to do.

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

If you want the cursor to remain normal, you should be using cursor: default

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

回答by Hymantheripper

Using inline styling use <a href="your link here" style="cursor:default">your content here</a>. See this example

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

Alternatively use css. See this example.

或者使用 css。请参阅此示例

This solution is cross-browser compatible.

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

回答by jagadish

<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>

回答by Anil Kumar Reddy

Try this

尝试这个

To Remove Hand Cursor

删除手形光标

a.link {
    cursor: default;
}