Then t...">

Is the spinner always displayed in the html number input field?

when I do a number input field as follows:

<input type="number" />

Then the number field gets the added spinner when I hover over the field. Many people talk about how to disable these spinners as follows:

http://css-tricks.com/snippets/css/turn-off-number-input-spinners/

But I would like to know how you make them ALWAYS visible, and not just when you hover over them?

+4
source share
3 answers

This cannot be done with a specific browser style. You will need to either create this functionality yourself using some kind of Javascript, or look for a ready-made script for firewalls.

DOM DOM, css-, , onclick onhover.

: http://css-infos.net/property/-webkit-appearance ( , )

-1

Chrome, . :

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

.

+12

To make the spinner always show, leave Schneeez ": hover" in response.

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

Source: https://habr.com/ru/post/1541909/


All Articles