Form Labels

2,717 Kb

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 Previews

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">
<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>

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%;
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);
textarea { border: 1px solid rgba(30, 110, 45, 0.5); margin: 0; padding: 5px 8px; width: 100%;
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 form labels. I just altered the code and added some different effects. */
Form Labels - Script Codes
Form Labels - Script Codes
Home Page Home
Developer Bryan Jones
Username bartuc
Uploaded July 13, 2022
Rating 3
Size 2,717 Kb
Views 56,644
Do you need developer help for Form Labels?

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!

Bryan Jones (bartuc) Script Codes
Earth Clock
3D Earth
Light Switch
Shine Effect
Card Flip
Create amazing blog posts with AI!

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!