Computer >> Computer tutorials >  >> Programming >> Javascript

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 −

Chrome input type=“number” CSS styling