微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

css – 跨浏览器的“cursor:pointer”

found these CSS attributes,使光标看起来像一只手:

> IE – style =“cursor:hand;”
> NS6 / IE6 – style =“cursor:pointer;”
> Cross browser – style =“cursor:pointer; cursor:hand;”

但是我注意到Stack Overflow在其CSS中使用“cursor:pointer”。
然而,这显然也在IE上工作。

那么…给了什么?什么是正确的,浏览器无关的方式来使用这个CSS项目?

解决方法

根据 Quirksmode,唯一的跨浏览器语法是:
element {
    cursor: pointer;
    cursor: hand;
}

他们还提供了有关光标的更多信息:

In the past the hand value was
Microsoft’s way of saying pointer; and
IE 5.0 and 5.5 only support hand.
Because it’s the cursor value that’s
used most often,most other browsers
have also implemented hand.

Since IE 6 and 7 support pointer,
there’s no more reason to use hand,
except when older IEs are part of your
target audience.

我认为您链接页面可能会与最新的浏览器有点过时。

原文地址:https://www.jb51.cc/css/220000.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。