Chrome input type=“number” CSS styling

JavascriptWeb DevelopmentFront End Scripts

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 −

raja
Published on 06-Apr-2018 11:33:50
Advertisements