开发者

Style attribute in IMAGE tag is not working in all browsers

I have a style attribute that is not working. In my code I am using an image for print. I want HAND CURSOR, so I added style attribute like the code below:

<img id="btnPrint" alt="Print" imagealign="AbsBottom" onclick="winPrint()" src="../../Images/print.gif" style开发者_运维百科="cursor: hand" />  

but this is not working in browsers other than Internet Explorer.


On Quirksmode there is compatibility table which shows hand isn't indeed supported. Use cursor: pointer instead of hand (because you really don't care about IE <5.5), as it is explained in the bottom of the page:

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜