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,644 |
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 |
Screens | 5,328 Kb |
Lightbulb | 2,833 Kb |
Earth Clock | 5,611 Kb |
Potion | 4,290 Kb |
3D Earth | 4,480 Kb |
Atom | 3,816 Kb |
Light Switch | 4,933 Kb |
Shine Effect | 2,944 Kb |
Card Flip | 5,712 Kb |
Vermhole | 6,053 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 |
Em Test | Rodesco | 1,784 Kb |
Segments mouse following | Nosir | 2,909 Kb |
Navcube | Wbarlow | 4,775 Kb |
Project -Show the Local Weather | Luciano_Britis | 2,583 Kb |
A Pen by Kenny Mark | Kennymark | 5,574 Kb |
Angular Sandbox | Alexgurrola | 1,616 Kb |
Expandable Left Side Bar with jQuery animate | Retrofuturistic | 2,483 Kb |
Learning FlexBox | Alex_rodrigues | 2,821 Kb |
Custom Checkbox and radio inputs SCSS | Rgfx | 3,367 Kb |
A Pen by Jay | Jaycode | 3,784 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!