开发者

Cross-browser 'cursor:pointer'

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

  • IE - style="cursor: hand;"
  • NS6/开发者_如何学Go IE6 - style="cursor: pointer;"
  • Cross Browser - style="cursor: pointer; cursor: hand;"

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

So ... what gives? What is the correct, browser-independent way to use this CSS item?


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

element {
    cursor: pointer;
    cursor: hand;
}

They give some more information about the cursor as well:

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.

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


I've only ever used cursor:pointer myself, and have noticed no lack of support in major browsers.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜