Fancy Text Inputs

Developer
Size
3,934 Kb
Views
60,720

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 Previews

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);
}
Fancy Text Inputs - Script Codes
Fancy Text Inputs - Script Codes
Home Page Home
Developer Alex Bergin
Username abergin
Uploaded June 13, 2022
Rating 4.5
Size 3,934 Kb
Views 60,720
Do you need developer help for Fancy Text Inputs?

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!

Alex Bergin (abergin) Script Codes
Create amazing sales emails 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!