Chrome input type=“number” CSS styling


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 −

Lakshmi Srinivas
Lakshmi Srinivas

Programmer / Analyst / Technician

Updated on: 25-Jun-2020

953 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements