The content on this website, including videos and code examples, is for educational purposes only. All demonstrations and designs are fictional and created to illustrate coding techniques. Any resemblance to existing websites or brands is purely coincidental.
The creators and administrators of this website do not claim ownership or affiliation with any existing websites or companies. Users are encouraged to use the information responsibly for learning purposes. Liability for any misuse of the content provided is not accepted.
Below is the html code for this video.
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Animation Inputs</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Custom Animation Inputs</h1>
<div class="input-container">
<div>
<input type="text" id="name" class="basic-slide" placeholder="Your Name" autocomplete="off">
<label for="name">Name</label>
</div>
<div>
<input type="email" id="email" class="clean-slide" placeholder="Your Email" autocomplete="off">
<label for="email">Email</label>
</div>
</div>
<div class="input-container">
<div>
<input type="tel" id="phone" class="scissors-gate" placeholder="Your Phone" autocomplete="off">
<label for="phone">Phone</label>
</div>
<div>
<input type="text" id="age" class="skinny" placeholder="Your Age" autocomplete="off">
<label for="age">Age</label>
</div>
</div>
<div class="input-container">
<div>
<input type="text" id="height" class="slide-up" placeholder="Your Height" autocomplete="off">
<label for="height">Height</label>
</div>
<div>
<input type="text" id="weight" class="hing-down" placeholder="Your Weight" autocomplete="off">
<label for="weight">Weight</label>
</div>
</div>
<div class="input-container">
<div>
<input type="text" id="address" class="swing" placeholder="Your Address" autocomplete="off">
<label for="address">Address</label>
</div>
<div>
<input type="text" id="pincode" class="balloon" placeholder="Address Line 2" autocomplete="off">
<label for="pincode">Pin Code</label>
</div>
</div>
</body>
</html>
Below is the css code for this video.
style.css
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
height: 100vh;
width: 100%;
background-color: #efdecd;
font-family: Verdana, Geneva, Tahoma, sans-serif;
line-height: 1.5;
font-weight: 400;
overflow: hidden;
}
h1 {
color: #800000;
font-size: 48px;
text-align: center;
margin: 50px 0;
}
.input-container {
position: relative;
display: flex;
width: 75%;
justify-content: space-around;
text-align: center;
margin: 30px auto;
z-index: 1;
}
.input-container div {
position: relative;
display: inline-block;
margin: 30px 10px;
}
.basic-slide::-webkit-input-placeholder, .clean-slide::-webkit-input-placeholder,
.scissors-gate::-webkit-input-placeholder, .skinny::-webkit-input-placeholder,
.slide-up::-webkit-input-placeholder, .hing-down::-webkit-input-placeholder,
.swing::-webkit-input-placeholder, .balloon::-webkit-input-placeholder {
color: #0892d0;
font-weight: 400;
text-indent: 0;
}
.basic-slide:focus::-webkit-input-placeholder, .basic-slide:active::-webkit-input-placeholder,
.clean-slide:focus::-webkit-input-placeholder, .clean-slide:active::-webkit-input-placeholder,
.scissors-gate:focus::-webkit-input-placeholder, .scissors-gate:active::-webkit-input-placeholder,
.skinny:focus::-webkit-input-placeholder, .skinny:active::-webkit-input-placeholder,
.slide-up:focus::-webkit-input-placeholder, .slide-up:active::-webkit-input-placeholder,
.hing-down:focus::-webkit-input-placeholder, .hing-down:active::-webkit-input-placeholder,
.swing:focus::-webkit-input-placeholder, .swing:active::-webkit-input-placeholder,
.balloon:focus::-webkit-input-placeholder, .balloon:active::-webkit-input-placeholder {
color: #0892d0;
}
.basic-slide, .clean-slide, .scissors-gate, .skinny, .slide-up, .hing-down, .swing, .balloon {
display: inline-block;
width: 250px;
background-color: #0892d0;
color: #a94064;
font-family: Verdana, Geneva, Tahoma, sans-serif;
font-weight: 400;
border: 0;
border-radius: 4px;
outline: 0;
transition: all 0.5s ease-in-out;
}
.basic-slide+label, .clean-slide+label, .scissors-gate+label, .skinny+label,
.slide-up+label, .hing-down+label, .swing+label, .balloon+label {
display: inline-block;
color: #efdecd;
}
.basic-slide {
padding: 10px 0 10px 15px;
text-indent: 65px;
}
.basic-slide+label {
position: absolute;
top: 0;
left: 0;
height: 100%;
background-color: #a94064;
padding: 7px 15px;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
text-shadow: 1px 1px 0 #0892d080;
transition: all 0.5s ease-in-out;
}
.basic-slide:focus, .basic-slide:active {
background-color: #bdb5d5;
color: #a94064;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
text-indent: 0;
}
.basic-slide:focus+label, .basic-slide:active+label {
transform: translateX(-100%);
}
.clean-slide {
position: relative;
padding: 10px 0 10px 15px;
text-indent: 55px;
}
.clean-slide+label {
position: absolute;
top: 0;
left: 0;
bottom: 0;
transform: translateX(0);
color: #efdecd;
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
text-shadow: 1px 1px 0 #a9406480;
text-align: left;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
padding: 11px 15px;
transition: all 0.5s ease-in-out, color 0.5s ease-out;
overflow: hidden;
}
.clean-slide+label::after {
content: '';
position: absolute;
top: 0;
right: 100%;
bottom: 0;
width: 100%;
background-color: #a94064;
transform: translate(0);
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
z-index: -1;
transition: all 0.5s ease-in-out;
}
.clean-slide:focus, .clean-slide:active {
background-color: #bdb5d5;
color: #a94064;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
text-indent: 0;
}
.clean-slide:focus+label, .clean-slide:active+label {
color: #efdecd;
transform: translateX(-100%);
text-shadow: 1px 1px 0 #a9406480;
}
.clean-slide:focus+label::after, .clean-slide:active+label::after {
transform: translate(100%);
}
.scissors-gate {
padding: 10px 0 10px 15px;
text-indent: 70px;
}
.scissors-gate+label {
position: absolute;
top: 0;
left: 0;
text-shadow: 1px 1px 0 #0892d080;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
transform-origin: left bottom;
padding: 6.25px 15px;
transition: all 0.5s ease-in-out;
z-index: 5;
}
.scissors-gate+label::before, .scissors-gate+label::after {
content: "";
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: #a94064;
border-radius: 4px;
transform-origin: left bottom;
pointer-events: none;
transition: all 0.5s ease-in-out;
z-index: -1;
}
.scissors-gate+label::before {
right: 20%;
background-color: #a9406440;
z-index: -2;
}
.scissors-gate:focus, .scissors-gate:active {
background-color: #bdb5d5;
color: #a94064;
text-indent: 0;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.scissors-gate:focus+label, .scissors-gate:active+label {
transform: rotate(-65deg);
border-radius: 4px;
}
.scissors-gate:focus+label::before, .scissors-gate:active+label::before {
transform: rotate(10deg);
}
.skinny {
padding: 10px 0 10px 15px;
text-indent: 50px;
}
.skinny+label {
position: absolute;
top: 0;
left: 0;
transform: translateX(0);
text-shadow: 1px 1px 0 #0892d080;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
padding: 6.25px 15px;
overflow: hidden;
transition: all 0.5s ease-in-out;
}
.skinny+label::before, .skinny+label::after {
content: "";
position: absolute;
left: 0;
right: 0;
z-index: -1;
transition: all 0.5s ease-in-out;
}
.skinny+label::before {
top: 5px;
bottom: 5px;
background-color: #a94064;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
.skinny+label::after {
top: 0;
bottom: 0;
background-color: #a94064;
}
.skinny:focus, .skinny:active {
background-color: #bdb5d5;
color: #a94064;
text-indent: 0;
}
.skinny:focus+label, .skinny:active+label {
transform: translate(-100%, -5%);
padding: 10px 15px;
}
.skinny:focus+label::after, .skinny:active+label::after {
transform: translateX(100%);
}
.slide-up {
padding: 10px 0 10px 15px;
text-indent: 75px;
}
.slide-up+label {
position: absolute;
top: 0;
left: 0;
transform: translateX(0);
text-shadow: 1px 1px 0 #0892d080;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
padding: 6.25px 15px;
overflow: hidden;
transition: all 0.5s ease-in-out;
}
.slide-up+label::before, .slide-up+label::after {
content: "";
position: absolute;
left: 0;
right: 0;
z-index: -1;
transition: all 0.5s ease-in-out;
}
.slide-up+label::before {
top: 6px;
left: 5px;
bottom: 6px;
right: 5px;
background-color: #a94064
}
.slide-up+label::after {
top: 0;
bottom: 0;
background-color: #a94064;
}
.slide-up:focus, .slide-up:active {
background-color: #bdb5d5;
color: #a94064;
text-indent: 0;
}
.slide-up:focus+label, .slide-up:active+label {
transform: translateY(-100%);
padding: 8px 15px 10px;
}
.slide-up:focus+label::before, .slide-up:active+label::before {
border-radius: 4px;
}
.slide-up:focus+label::after, .slide-up:focus+label::after {
transform: translateY(100%);
}
.hing-down {
padding: 10px 0 10px 15px;
text-indent: 75px;
}
.hing-down+label {
position: absolute;
top: 0;
left: 0;
display: block;
background-color: #a94064;
text-shadow: 1px 1px 0 #0892d080;
transform: perspective(300px) scaleX(1) rotateY(0deg);
transform-origin: right center;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
padding: 6.25px 15px;
transition: all 0.5s ease-in-out;
}
.hing-down:focus, .hing-down:active {
background-color: #bdb5d5;
color: #a94064;
text-indent: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.hing-down:focus+label, .hing-down:active+label {
transform: perspective(600px) translateX(-100%) rotateY(80deg);
}
.swing {
padding: 10px 0 10px 15px;
text-indent: 85px;
}
.swing+label {
position: absolute;
top: 0;
left: 0;
background-color: #a94064;
text-shadow: 1px 1px 0 #0892d080;
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
transform-origin: 2px 2px;
transform: rotate(0);
padding: 6.25px 15px;
animation: backSwingAnim 0.5s ease-in-out;
}
.swing:focus, .swing:active {
background-color: #bdb5d5;
color: #a94064;
text-indent: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.swing:focus+label, .swing:active+label {
transform: rotate(85deg);
animation: swingAnim 1.5s ease-in-out;
}
@keyframes swingAnim {
0% {
transform: rotate(0);
}
20% {
transform: rotate(115deg);
}
40% {
transform: rotate(60deg);
}
60% {
transform: rotate(95deg);
}
80% {
transform: rotate(75deg);
}
100% {
transform: rotate(85deg);
}
}
@keyframes backSwingAnim {
0% {
transform: rotate(85deg);
}
100% {
transform: rotate(0deg);
}
}
.balloon {
padding: 10px 0 10px 15px;
text-indent: 75px;
}
.balloon+label {
position: absolute;
top: 8px;
left: 0;
bottom: 8px;
background-color: #a9406400;
color: #efdecd;
text-shadow: 1px 1px 0 #a9406480;
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
border-radius: 4px;
padding: 3px 15px;
transition: all 0.5s ease-in-out;
}
.balloon+label::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
height: 0;
width: 0;
margin-left: -3px;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid transparent;
transition: all 0.5s ease-in-out;
}
.balloon:focus, .balloon:active {
background-color: #bdb5d5;
color: #a94064;
text-indent: 0;
}
.balloon:focus+label, .balloon:active+label {
background-color: #a94064;
color: #efdecd;
transform: translateY(-40px);
text-shadow: 1px 1px 0 #0892d080;
padding: 1.25px 15px 3px;
}
.balloon:focus+label::after, .balloon:active+label::after {
border-top: 4px solid #a94064;
}
Thanks for visiting