:in-range (selettore CSS e jQuery) riguarda gli elementi HTML che abbiano inserito un valore nel range (per il suo opposto, v. il selettore CSS e jQuery :out-of-range).
Sintassi
:in-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:
Contenuti correlati
- CSS
- HTML
- JavaScript
- jQuery
- PHP
- SQL
- WORDPRESS
0 Comment