The :out-of-range selector selects all elements with a value that is outside a specified range.
The :out-of-range selector only works for elements with range limitations, such as input elements with min and max attributes.
Code:-
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
input:out-of-range {
background: red;
}
</style>
</head>
<body>
<input type="number" min="2" max="8">
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
input:out-of-range {
background: red;
}
</style>
</head>
<body>
<input type="number" min="2" max="8">
</body>
</html>
Css:- out of range
Reviewed by Network security
on
May 12, 2019
Rating:
No comments: