如何控制输入类型=“数字"的大小?箭头按钮 [英] How to control the size of input type="number" arrow buttons

查看:137
本文介绍了如何控制输入类型=“数字"的大小?箭头按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实现类型为数字"的输入组合框.

I'm implementing an input combo box of type="number".

我要调整向上箭头按钮和底部箭头按钮的大小.

I want to adjust the size of the up-arrow button and bottom-arrow button.

我认为这些按钮是如此之小,以至于用户可能会感到不方便的点击动作.

I think that these buttons are so small buttons that users may feel an inconvenient click motion.

我一直在尝试通过谷歌搜索来解决此问题,研究它的属性和选择器,但是我没有任何方法,我希望这是因为数字框是最近发布的HTML5标签.

I've been trying to fix this by Googling, investigating properties and selectors of this, but I couldn't get any methods, and I expect that this is because number box has been recently released tag of HTML5.

如何调整此尺寸?请给我任何想法.请.

How Can I adjust this size? please give me any idea. please.

关于

<td>
<input type="number" name="qty" value="1" name="goodsnum" onChange = "qtyChanged();">
</td>

推荐答案

您可以通过CSS与箭头进行交互.

You can interact with arrows by css.

input[type=number] {
    height: 30px;
}

input[type=number]:hover::-webkit-inner-spin-button {  
    width: 14px;
    height: 30px;
}

<input type="number" value="0" >

这篇关于如何控制输入类型=“数字"的大小?箭头按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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