:out-of-range (selettore CSS e jQuery) riguarda gli elementi HTML che non abbiano inserito un valore nel previsto range (per il suo opposto, v. :in-range).
Sintassi
:out-of-range {
/* codice */
}
Esempi
<style>
input:in-range {
background-color: green;
}
input:out-of-range {
background-color: red;
}
</style>
<form>
inserisci un numero tra 1 e 10:
<input type="number" min="1" max="10">
</form>
inserisci un numero tra 1 e 10:
0 Comment