Created
October 9, 2017 09:36
-
-
Save techxdeveloper/28cba270667b93e89f441bc9b081697d to your computer and use it in GitHub Desktop.
CSS Psuedo Class Selector (:valid and :invalid)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CSS Psuedo Class Selector (:valid and :invalid)</title> | |
<style> | |
h1 { | |
color: #00bdc4; | |
border-bottom: 1px solid #bdbdbd; | |
padding-bottom: 20px; | |
} | |
input:valid { | |
background-color: #00bcd4; | |
color: #f5f5f5; | |
} | |
input:invalid { | |
background-color: #f44336; | |
color: #f5f5f5; | |
} | |
</style> | |
</head> | |
<body> | |
<div> | |
<h1>CSS Psuedo Class Selector (:valid and :invalid)</h1> | |
<form action=""> | |
Email Address: <input type="email"><br> | |
</form> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment