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 |
Earth Clock | 5,611 Kb |
Solar System Maker | 3,893 Kb |
Planets | 2,959 Kb |
Atom | 3,816 Kb |
Solar System | 3,454 Kb |
Light Switch | 4,933 Kb |
3D Earth | 4,480 Kb |
Books | 5,030 Kb |
Card Flip | 5,712 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 |
Pomodoro Timer | Sdas13 | 2,900 Kb |
React JS Movie Info App | MTushar | 4,870 Kb |
Twitch JSON API | Jvhti | 2,808 Kb |
Wip elementary os navbar | Nickcolley | 2,993 Kb |
Portfolio page | Bhavya_j | 2,804 Kb |
Cloud upload | Jaflo | 2,774 Kb |
Classy Blockquote Styling | Andrewwright | 3,212 Kb |
Elon Musk - Tribute Page - FreeCodeCamp | Yunnimun | 8,615 Kb |
Experiments with Vertical Centering | KatieK2 | 3,924 Kb |
Pictos font library from CodePen | Jstam | 3,790 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!