简体   繁体   中英

input type=“number” works wrong in firefox

I'm using an input type="number" in my html and it looks great in Chrome (v66), but no with Firefox (v60). Here are the results:

Using Google Chrome:

谷歌浏览器


Using Mozilla Firefox:

火狐浏览器


How could I fix it with Firefox?

Thanks!

Chrome and Firefox have pre-built visual variations on the user-forms (and some other things as well).

Best way to avoid this from happening is to simply style your own unified looks using css. For example:

input[type="number"] {
   // whatever style you want, i'll go with basic box as an example
   border: 1px solid black;
   width: 50px;
   height: 30px;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM