input属性为number时,如何去掉右边的 +、-号

it2026-01-28  9

修改css

/* 谷歌 */ input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; } /* 火狐 */ input{ -moz-appearance:textfield; } 这样就OK啦

转载于:https://www.cnblogs.com/520BigBear/p/9930207.html

最新回复(0)