开发者

Why in the input type button the cursor is an arrow and not a hand?

开发者 https://www.devze.com 2023-01-17 17:22 出处:网络
This question is because normally when you want to c开发者_StackOverflow社区lick a button or link the user expect a HAND in the cursor but in the case of input type=\"button\" you get a cursor arrow ,

This question is because normally when you want to c开发者_StackOverflow社区lick a button or link the user expect a HAND in the cursor but in the case of input type="button" you get a cursor arrow , does any know why is this? is cause is inherit from base class input?? and all inputs have pointer cursor?

I Know a simple css lik {cursor:pointer} //make the work... but wait is not make more sense that instead of "cursor:pointer" would be {cursor:hand} //IE support this one.

Hope some have the answer.


It's because it has no defined cursor style so it defaults to default


The "hand" cursor originally arose because of single-click links. And, in a web browser, the <a> element is the link element.

But, in other contexts (Windows forms, etc.), the default cursor (arrow pointer) can click on the buttons, so the browsers are just keeping UI consistent.

A browser could theoretically change the default cursor to a hand for <input type="button"> elements.

But, cursor:pointer; makes more sense for CSS, because it doesn't necessarily have to be a hand image. You can always change your cursors to another image, but the behavior (pointer in this case) defines what you call the cursor, not the image.

0

精彩评论

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