Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save techxdeveloper/5eea81632440f4b71a605fe5bc7f93ac to your computer and use it in GitHub Desktop.
Save techxdeveloper/5eea81632440f4b71a605fe5bc7f93ac to your computer and use it in GitHub Desktop.
CSS Psuedo Class Selector (:focus)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS Psuedo Class Selector (:focus)</title>
<style>
h1 {
color: #00bdc4;
border-bottom: 1px solid #bdbdbd;
padding-bottom: 20px;
}
input:focus {
background: #00bcd4;
color: #f5f5f5;
}
</style>
</head>
<body>
<div>
<h1>CSS Psuedo Class Selector (:focus)</h1>
<form action="">
First Name: <input type="text" value="Bruce"><br>
Last Name: <input type="text" value="Wayne"><br>
</form>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment