CSS Styling for Chrome Input Type Number



To style input type = number, use the following CSS −

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

The above shows without a spinner.

To show and style a spinner, use

input[type=number]::-webkit-inner-spin-button {
   opacity: 1;
}

Output

The above shows the following output −

Updated on: 2020-06-25T07:20:05+05:30

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started