Fancy Text Inputs
How do I make an fancy text inputs?
Using the required hack. What is a fancy text inputs? How do you make a fancy text inputs? This script and codes were developed by Alex Bergin on 13 June 2022, Monday.
Fancy Text Inputs - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Fancy Text Inputs</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ .transition, form button, form .question label, form .question input[type="text"] { -moz-transition: all 0.25s cubic-bezier(0.53, 0.01, 0.35, 1.5); -o-transition: all 0.25s cubic-bezier(0.53, 0.01, 0.35, 1.5); -webkit-transition: all 0.25s cubic-bezier(0.53, 0.01, 0.35, 1.5); transition: all 0.25s cubic-bezier(0.53, 0.01, 0.35, 1.5);
}
* { font-family: Helvetica, sans-serif; font-weight: light; -webkit-font-smoothing: antialiased;
}
html { background-color: #ff4a56;
}
form { position: relative; display: inline-block; max-width: 700px; min-width: 500px; box-sizing: border-box; padding: 30px 25px; background-color: white; border-radius: 40px; margin: 40px 0; left: 50%; -moz-transform: translate(-50%, 0); -ms-transform: translate(-50%, 0); -webkit-transform: translate(-50%, 0); transform: translate(-50%, 0);
}
form h1 { color: #ff4a56; font-weight: 100; letter-spacing: 0.01em; margin-left: 15px; margin-bottom: 35px; text-transform: uppercase;
}
form button { margin-top: 35px; background-color: white; border: 1px solid #ff4a56; line-height: 0; font-size: 17px; display: inline-block; box-sizing: border-box; padding: 20px 15px; border-radius: 60px; color: #ff4a56; font-weight: 100; letter-spacing: 0.01em; position: relative; z-index: 1;
}
form button:hover, form button:focus { color: white; background-color: #ff4a56;
}
form .question { position: relative; padding: 10px 0;
}
form .question:first-of-type { padding-top: 0;
}
form .question:last-of-type { padding-bottom: 0;
}
form .question label { transform-origin: left center; color: #ff4a56; font-weight: 100; letter-spacing: 0.01em; font-size: 17px; box-sizing: border-box; padding: 10px 15px; display: block; position: absolute; margin-top: -40px; z-index: 2; pointer-events: none;
}
form .question input[type="text"] { appearance: none; background-color: none; border: 1px solid #ff4a56; line-height: 0; font-size: 17px; width: 100%; display: block; box-sizing: border-box; padding: 10px 15px; border-radius: 60px; color: #ff4a56; font-weight: 100; letter-spacing: 0.01em; position: relative; z-index: 1;
}
form .question input[type="text"]:focus { outline: none; background: #ff4a56; color: white; margin-top: 30px;
}
form .question input[type="text"]:valid { margin-top: 30px;
}
form .question input[type="text"]:focus ~ label { -moz-transform: translate(0, -35px); -ms-transform: translate(0, -35px); -webkit-transform: translate(0, -35px); transform: translate(0, -35px);
}
form .question input[type="text"]:valid ~ label { text-transform: uppercase; font-style: italic; -moz-transform: translate(5px, -35px) scale(0.6); -ms-transform: translate(5px, -35px) scale(0.6); -webkit-transform: translate(5px, -35px) scale(0.6); transform: translate(5px, -35px) scale(0.6);
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <form> <h1>Fancy Text Inputs</h1> <div class="question"> <input type="text" required/> <label>First Name</label> </div> <div class="question"> <input type="text" required/> <label>Last Name</label> </div> <div class="question"> <input type="text" required/> <label>Email Address</label> </div> <div class="question"> <input type="text" required/> <label>Email Confirm</label> </div> <button>Submit</button>
</form>
</body>
</html>
Fancy Text Inputs - Script Codes CSS Codes
.transition, form button, form .question label, form .question input[type="text"] { -moz-transition: all 0.25s cubic-bezier(0.53, 0.01, 0.35, 1.5); -o-transition: all 0.25s cubic-bezier(0.53, 0.01, 0.35, 1.5); -webkit-transition: all 0.25s cubic-bezier(0.53, 0.01, 0.35, 1.5); transition: all 0.25s cubic-bezier(0.53, 0.01, 0.35, 1.5);
}
* { font-family: Helvetica, sans-serif; font-weight: light; -webkit-font-smoothing: antialiased;
}
html { background-color: #ff4a56;
}
form { position: relative; display: inline-block; max-width: 700px; min-width: 500px; box-sizing: border-box; padding: 30px 25px; background-color: white; border-radius: 40px; margin: 40px 0; left: 50%; -moz-transform: translate(-50%, 0); -ms-transform: translate(-50%, 0); -webkit-transform: translate(-50%, 0); transform: translate(-50%, 0);
}
form h1 { color: #ff4a56; font-weight: 100; letter-spacing: 0.01em; margin-left: 15px; margin-bottom: 35px; text-transform: uppercase;
}
form button { margin-top: 35px; background-color: white; border: 1px solid #ff4a56; line-height: 0; font-size: 17px; display: inline-block; box-sizing: border-box; padding: 20px 15px; border-radius: 60px; color: #ff4a56; font-weight: 100; letter-spacing: 0.01em; position: relative; z-index: 1;
}
form button:hover, form button:focus { color: white; background-color: #ff4a56;
}
form .question { position: relative; padding: 10px 0;
}
form .question:first-of-type { padding-top: 0;
}
form .question:last-of-type { padding-bottom: 0;
}
form .question label { transform-origin: left center; color: #ff4a56; font-weight: 100; letter-spacing: 0.01em; font-size: 17px; box-sizing: border-box; padding: 10px 15px; display: block; position: absolute; margin-top: -40px; z-index: 2; pointer-events: none;
}
form .question input[type="text"] { appearance: none; background-color: none; border: 1px solid #ff4a56; line-height: 0; font-size: 17px; width: 100%; display: block; box-sizing: border-box; padding: 10px 15px; border-radius: 60px; color: #ff4a56; font-weight: 100; letter-spacing: 0.01em; position: relative; z-index: 1;
}
form .question input[type="text"]:focus { outline: none; background: #ff4a56; color: white; margin-top: 30px;
}
form .question input[type="text"]:valid { margin-top: 30px;
}
form .question input[type="text"]:focus ~ label { -moz-transform: translate(0, -35px); -ms-transform: translate(0, -35px); -webkit-transform: translate(0, -35px); transform: translate(0, -35px);
}
form .question input[type="text"]:valid ~ label { text-transform: uppercase; font-style: italic; -moz-transform: translate(5px, -35px) scale(0.6); -ms-transform: translate(5px, -35px) scale(0.6); -webkit-transform: translate(5px, -35px) scale(0.6); transform: translate(5px, -35px) scale(0.6);
}
Developer | Alex Bergin |
Username | abergin |
Uploaded | June 13, 2022 |
Rating | 4.5 |
Size | 3,934 Kb |
Views | 60,720 |
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 |
Header Layout | 3,123 Kb |
Sibling Selector Style Change on Hover | 3,087 Kb |
Glitch Camera | 42,627 Kb |
G - Golf | 3,098 Kb |
Baymax | 6,250 Kb |
Activate on Scroll | 3,358 Kb |
Singing Text To Speech | 9,647 Kb |
P - Polaroid | 3,532 Kb |
Motion blur loader | 2,505 Kb |
Show Nav On Scroll | 4,898 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 |
Dice | Fraina | 5,026 Kb |
Scifi-style Interative Form | Aaronchuo | 4,566 Kb |
A Pen by Miro Olma | Programiro | 2,342 Kb |
Update CSS Variables with JS | Wesbos | 2,335 Kb |
JQuery FullScreen Overlay | _codemics | 2,252 Kb |
Loader | MikitaLisavets | 3,321 Kb |
Profile box | Daniesy | 2,766 Kb |
Expandable Left Side Bar with jQuery animate | Retrofuturistic | 2,483 Kb |
Progressively reveal dots on a Bezier curve | GreenSock | 2,489 Kb |
Minimal Menu | Achudars | 3,430 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!