HTML CSS examples for CSS Selector:in-range
The :in-range selector selects elements whose value is within the specified range.
The :in-range selector only works with elements who have range limitations, input elements with min and max attributes.
Select only if the value of the <input> element is "in range":
<!DOCTYPE html> <html> <head> <style> input:in-range {<!--from www . j a v a 2 s.c o m--> border: 2px solid blue; } </style> </head> <body> <input type="number" min="5" max="10" value="7"> <p>range is between 5 and 10</p> </body> </html>