Form Labels
How do I make an form labels?
Uses CSS puesdo element :focus to build a nice looking form.. What is a form labels? How do you make a form labels? This script and codes were developed by Bryan Jones on 13 July 2022, Wednesday.
Form Labels - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Form Labels</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <form id="example-form"> <h2>Form Labels</h2> <div class="form-wrapper"> <input type="text" value="" name="name" id="name" placeholder="Enter Name" /> <label for="name">Your Name</label> </div> <div class="form-wrapper"> <input type="text" value="" name="email" id="email" placeholder="Enter Email" /> <label for="email">Your Email</label> </div> <div class="form-wrapper"> <textarea name="message" id="name" placeholder="Enter Message"></textarea> <label for="message">Important Message</label> </div>
</form> <script src="js/index.js"></script>
</body>
</html>
Form Labels - Script Codes CSS Codes
@-webkit-keyframes bounce { 0% { top: 0; } 50% { top: -5px; } 100% { top: 0; }
}
@keyframes bounce { 0% { top: 0; } 50% { top: -5px; } 100% { top: 0; }
}
form { margin: 5%; width: 300px;
}
.form-wrapper { height: 60px; position: relative; top: 5px; width: 100%;
}
label,
input,
textarea { outline: none; top: 0; position: absolute;
}
label { background: #273; color: #fff; display: none; font-size: 80%; font-weight: bold; padding: 3px 8px; text-align: center; width: auto; -moz-border-radius: 5px 5px 0 0; -webkit-border-radius: 5px; border-radius: 5px 5px 0 0; -moz-transform: translateY(0); -ms-transform: translateY(0); -webkit-transform: translateY(0); transform: translateY(0);
}
input,
textarea { border: 1px solid rgba(30, 110, 45, 0.5); margin: 0; padding: 5px 8px; width: 100%;
}
input:focus,
textarea:focus { border: 1px solid #1e6e2d; background-color: #efe;
}
input:focus + label,
textarea:focus + label { -webkit-animation: bounce 500ms; animation: bounce 500ms; display: block; -moz-transform: translateY(-100%); -ms-transform: translateY(-100%); -webkit-transform: translateY(-100%); transform: translateY(-100%);
}
Form Labels - Script Codes JS Codes
/* Inspired by http://codepen.io/james2doyle form labels. I just altered the code and added some different effects. */
Developer | Bryan Jones |
Username | bartuc |
Uploaded | July 13, 2022 |
Rating | 3 |
Size | 2,717 Kb |
Views | 56,672 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Books | 5,030 Kb |
Screens | 5,328 Kb |
Lens Flare | 4,199 Kb |
3D Earth | 4,480 Kb |
Shine Effect | 2,944 Kb |
Planets | 2,959 Kb |
Gravity | 4,905 Kb |
Loader | 2,367 Kb |
See the Truth | 3,488 Kb |
Planet Awesome | 3,554 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
WRENCH - STAFF | Lolita-adams | 1,608 Kb |
Wip elementary os navbar | Nickcolley | 2,993 Kb |
Loading Bar | Jaradlight | 2,333 Kb |
Intake Form Page 2 | Ijantje | 4,983 Kb |
Simple blog concept | Drew_mc | 2,666 Kb |
SCSS Social Icons Flat | Mattsince87 | 3,482 Kb |
Blog Concept 2 | JGallardo | 2,994 Kb |
Drill-down Map | Good886 | 8,484 Kb |
Animate elements with fixed gradient | Badabam | 4,406 Kb |
Under construction | GhostRider | 1,642 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!