CSS :in-range selector
Complete CSS Selector Reference Manual
Example
When the input value is within the specified range, set the specified style:
input:in-range
{
border:2px solid yellow;
}
Try it »
Definition and usage
:in-range selector is used to style an element when its value is within a specified range.
Note: :in-range selector only applies to elements that can specify a range of values, such as the min and max attributes of the input element.
Browser support
The numbers in the table indicate the first browser version that supports this property.
| Selector | |||||
|---|---|---|---|---|---|
| :in-range | 10.0 | Not supported | 28.0 | 5.2 | 11.0 |
CSS Syntax
:in-range
{
css declaration
;
}
Related pages
CSS selector :out-of-range