跨浏览器的“cursor:pointer” [英] Cross-browser 'cursor:pointer'

查看:140
本文介绍了跨浏览器的“cursor:pointer”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

找到了这些CSS属性,使光标看起来像一只手:

I found these CSS attributes, that make the cursor look like a hand:


  • IE - style =cursor:hand;

  • NS6 / IE6 - style =cursor:pointer;

  • 跨浏览器 - style =cursor:pointer; cursor:hand ;

  • IE - style="cursor: hand;"
  • NS6/ IE6 - style="cursor: pointer;"
  • Cross Browser - style="cursor: pointer; cursor: hand;"

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

However I notice that Stack Overflow is using "cursor: pointer" in its CSS. However, this apparently work also on IE.

那么什么给了?

推荐答案

根据 Quirksmode ,唯一的跨浏览器语法是:

According to Quirksmode, the only cross-browser syntax is:

element {
    cursor: pointer;
    cursor: hand;
}

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

They give some more information about the cursor as well:


过去的价值是
微软的说法指针;和
IE 5.0和5.5只支持手。
因为最常用的是
的游标值,大多数其他浏览器
也实现了。

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.

由于IE 6和7支持指针,
没有更多理由使用手,
除非旧的IE是您的
目标受众的一部分。

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.

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

I think the page you linked to might be a little outdated with the newest browsers.

这篇关于跨浏览器的“cursor:pointer”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆