:in-range selector

:in-range selector apply the style on the elements with the value within the specified range. 

NOTE: It only works for input elements with min and/or max attributes.

Example


input:in-range {
  color: green;
}

<input type="number" min="2" max="10" value="3">

:out-of-range selector

:out-of-range selector apply the style on the elements with the value out of the specified range. 

NOTE: It only works for input elements with min and/or max attributes.

Example


input:out-of-range {
  color: red;
}

<input type="number" min="2" max="10" value="11">

0 Comments

Leave a reply

Your email address will not be published. required fields are marked *