CSS :in-range Pseudo-class
Example
Select and style the input field only if the value of the field is within the range limit:
input:in-range {
border: 2px solid green;
background-color: beige;
}
Try it Yourself »
Definition and Usage
The :in-range
pseudo-class matches any elements with a value within
the range limit.
Note: The :in-range
pseudo-class
is used for <input> elements with min and/or max attributes.
Tip: Use the :out-of-range pseudo-class to select all elements with a value that is outside a specified range.
Version: | CSS3 |
---|
Browser Support
The numbers in the table specifies the first browser version that fully supports the pseudo-class.
Pseudo-class | |||||
---|---|---|---|---|---|
:in-range | 53 | 13 | 50 | 10.1 | 40 |
CSS Syntax
Related Pages
CSS Selector :out-of-range