The :valid selector selects form elements with a value that validates according to the element's settings.
Code:-
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
:valid {
background: green;
}
</style>
</head>
<body>
<input type="number" min="2" max="10">
<input type="email">
</body>
</html>
Css:- Valid selector
Reviewed by Network security
on
May 13, 2019
Rating:
No comments: