开发者

Is there a way to hide the new HTML5 spinbox controls shown in Google Chrome & Opera? [duplicate]

This 开发者_开发百科question already has answers here: Can I hide the HTML5 number input’s spin box? (20 answers) Closed 9 years ago.

Google Chrome now, and Opera before, shows a "spin box" control beside a input field of type "number". I want to be able to style this, or hide it. Are there ways of controlling this UI element yet?

EG:

Is there a way to hide the new HTML5 spinbox controls shown in Google Chrome & Opera? [duplicate]

<-- That little ui element with an up and down arrow. It's not that functional and its adding unnedded elements to a form I've created.

I understand I can just not have the type as "number" but it allows built in prevention of entering anything other than a number, and is semantically correct.


At the moment, the answer is no - as far as I know anyway.

The HTML5 spec generally doesn't want to dictate what the user interface should look like, this also applies to the input type=number feature. I think there is a sort of implicitly expected workflow which goes somewhat like

input from authors/browser vendors/interesting people > spec text in HTML spec > implementations (experimenting with UI) > UI conventions (experimenting with styling) > CSS proposals > CSS spec for how to style the new controls.

Hence, real control over the rendering of the new inputs won't be possible in the near future. Of course, browsers may meanwhile implement experimental vendor-specific CSS extensions..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜