【发布时间】:2010-12-03 07:27:27
【问题描述】:
我在http://www.w3.org/TR/CSS2/ui.html 和http://www.quirksmode.org/css/cursor.html#note 都遵循 W3C 的标准。但是,当鼠标悬停时,元素不会显示手。请帮忙。
<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和鼠标悬停查看时,它不会将光标变成“手”,而是只是普通的箭头。请指教。
谢谢!
【问题讨论】:
-
检查您的 DOCTYPE,因为 IE 需要在标准兼容模式下才能正常工作。
-
只给锚一个
href属性会容易得多,例如<a href="#"或<a href="javascript:;" -
如果我使用“#”语法,在点击 img 链接后,它会将我“踢”到页面顶部,以为我的页面中有一个锚点。如果我使用 href="javascript:;",鼠标悬停时看起来有点丑:(
标签: javascript html css internet-explorer-9 mouse-cursor