使用 <input type="number" value="1" /> 会自带加减按钮,但是并不需要这个按钮,大多是时候都是另外写新的按钮。
去掉自带的加减按钮,只需添加一段css代码。
<style> input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none !important; } </style>
效果如下:
使用 <input type="number" value="1" /> 会自带加减按钮,但是并不需要这个按钮,大多是时候都是另外写新的按钮。
去掉自带的加减按钮,只需添加一段css代码。
<style> input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none !important; } </style>
效果如下:
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。