CSS2 光标不显示“手”

发布于 2024-10-05 18:58:37 字数 738 浏览 4 评论 0原文

我在这里遵循 W3C 标准 http://www.w3.org/TR/ CSS2/ui.html 和此处 http://www.quirksmode.org/ css/cursor.html#note。但是,当鼠标悬停时,该元素不会显示在手上。请帮忙。

<a style="cursor:pointer;cursor:hand" onclick='javascript:window.open("http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>&amp;t=<?php single_post_title(); ?>", "_blank", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=no,left=300,top=100,width=626,height=436")'>[image goes here]</a>

当使用IE9和鼠标悬停查看时,它不会将光标变为“手”,而只是常规箭头。请指教。

谢谢!

I'm following the standard of W3C here http://www.w3.org/TR/CSS2/ui.html and here http://www.quirksmode.org/css/cursor.html#note. However, the element isn't displayed the hand when mouseover. Please help.

<a style="cursor:pointer;cursor:hand" onclick='javascript:window.open("http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>&t=<?php single_post_title(); ?>", "_blank", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=no,left=300,top=100,width=626,height=436")'>[image goes here]</a>

When viewing with IE9 and mouseover, it doesn't change the cursor into the "hand", but it's just the regular arrow instead. Please advise.

Thanks!

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

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

发布评论

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

评论(4

给我一枪 2024-10-12 18:58:37

它应该是单独的 cursor:pointer;,因为 hand 是仅由旧版本 IE 实现的专有值,因此是无效值。

不过,如果您确实关心 IE 5.x,则可以互换这两个属性,即(光标:手;光标:指针,手优先)。不过你的 CSS 仍然会失效,所以我希望你不要打扰。

It should be cursor: pointer; alone because hand is a proprietary value only implemented by old versions of IE, and is thus an invalid value.

If you actually care about IE 5.x, though, you switch the two properties around, i.e. (cursor: hand; cursor: pointer, hand comes first). Your CSS will still invalidate though, so I'd rather you not bother.

初雪 2024-10-12 18:58:37

hand 不是光标的有效值——它是 IE8 遗留的。使用指针

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

hand is not a valid value for cursor -- it is IE8- legacy. Use pointer.

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

游魂 2024-10-12 18:58:37

在您提供的链接中:

Value:      [ [<uri> ,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help | progress ] ] | inherit

hand is not valid css

in the other link hand 被提及,但它仅在 ie(不包括 ie9 beta)和 Opera 中受支持。

如果您正在寻找食指指向的手,您希望 pointer 成为 css 中最后提到的一个

in your supplied link:

Value:      [ [<uri> ,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help | progress ] ] | inherit

hand is not valid css

in the other link hand is mentioned however it is only supported in ie, excluding ie9 beta, and in opera.

if you are looking for the hand with the pointing indexfinger you want pointer to be the last one mentioned in the css

中二柚 2024-10-12 18:58:37

尝试省略“光标:手;”。根据您引用的文章,它仅适用于 Internet Explorer 5。除非您正在为仍在使用该浏览器的公司开发内部 Web 应用程序,否则我会将其保留。

Try leaving out "cursor:hand;". According to the article you refer to, it is only needed for Internet Explorer 5. Unless you are developing a internal web app for a company who still work with that browser, I'd leave it out.

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