如何更改网页上的鼠标指针图标?

发布于 2025-01-06 23:35:53 字数 83 浏览 4 评论 0原文

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

Is there any way to change mouse pointer icon using javascript(or any other method) when I hover it on a normal text on which I want it to appear like a hand as with links on a webpage.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

依 靠 2025-01-13 23:35:53

请参阅 http://www.w3schools.com/cssref/pr_class_cursor.asp

使用 css:

div { 光标:指针; }

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

Using css:

div { cursor:pointer; }

暮年 2025-01-13 23:35:53

查找 css 属性 cursor

这是最好的方法。

Look up the css attribute cursor.

It's the best way to do it.

凉城 2025-01-13 23:35:53

你可以这样使用:


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

You could use like:


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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文