gpt4 book ai didi

css - 在输入数字中隐藏向上和向下箭头按钮(微调器)- Firefox 29

转载 作者:IT王子 更新时间:2023-10-29 03:24:04 27 4
gpt4 key购买 nike

在 Firefox 28 上,我使用的是 <input type="number">效果很好,因为它会在本应仅包含数字的输入字段上调出数字键盘。

在 Firefox 29 中,使用数字输入会在字段右侧显示旋转按钮,这在我的设计中看起来很糟糕。我真的不需要这些按钮,因为当你需要写类似 6~10 位数字的东西时,它们毫无用处。

是否可以使用 CSS 或 jQuery 禁用此功能?

最佳答案

根据 this blog post ,你需要在input上设置-moz-appearance:textfield;

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}

input[type=number] {
-moz-appearance:textfield;
}
<input type="number" step="0.01"/>

关于css - 在输入数字中隐藏向上和向下箭头按钮(微调器)- Firefox 29,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23372903/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com