input[type="number"]::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
-webkit-appearance: none;
appearance: none;
}
input[type='number'],
input[type='number']:hover,
input[type='number']:focus {
-moz-appearance: textfield;
}
注意各種瀏覽器支援~
demo
- https://codepen.io/yashwant/pen/vGRXvp
- javascript - Can I hide the HTML5 number input’s spin box? - Stack Overflow