Chrome输入类型=“数字” CSS样式 [英] Chrome input type="number" CSS styling

查看:117
本文介绍了Chrome输入类型=“数字” CSS样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下输入类型=数字:

I have the following input type="number":

<input id="myid" type="number" name="input" min="0" max="100" step="1" value="0">

在Chrome中,只有您可以看到2个箭头来增加或减少值。有没有一种方法来设置这些控件的样式。例如:

In Chrome only you can see 2 arrows that increase or decrease the value. Is there a way to style those controls. Something like:

#myid::-webkit-


推荐答案

我自己也遇到过这个问题。其实,我试图摆脱它们,然而,在链接的SO问题中的相同规则仍然应该适用于改变外观。我在另一个 SO问题中找到了解决方案。看看接受的答案,它就像一个魅力。

I just ran into this myself. Actually, I was trying to get rid of them, however, the same rules in the the linked SO question still should apply for altering appearance as well. I found the solution in another SO question. Look at the accepted answer, it works like a charm.

这篇关于Chrome输入类型=“数字” CSS样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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