CSS2 光标不显示“手”
我在这里遵循 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(); ?>&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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
它应该是单独的
cursor:pointer;
,因为hand
是仅由旧版本 IE 实现的专有值,因此是无效值。不过,如果您确实关心 IE 5.x,则可以互换这两个属性,即(
光标:手;光标:指针
,手优先)。不过你的 CSS 仍然会失效,所以我希望你不要打扰。It should be
cursor: pointer;
alone becausehand
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.hand
不是光标的有效值——它是 IE8 遗留的。使用指针
。http://www.w3schools.com/css/pr_class_cursor.asp
hand
is not a valid value for cursor -- it is IE8- legacy. Usepointer
.http://www.w3schools.com/css/pr_class_cursor.asp
在您提供的链接中:
hand
is not valid cssin the other link hand 被提及,但它仅在 ie(不包括 ie9 beta)和 Opera 中受支持。
如果您正在寻找食指指向的手,您希望
pointer
成为 css 中最后提到的一个in your supplied link:
hand
is not valid cssin 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尝试省略“光标:手;”。根据您引用的文章,它仅适用于 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.