LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code


	
    
    
    
	Animated Login Form





CSS
body {
	margin: 0;
	padding: 0;
	background-color: #333;
}
.login-form {
	position: absolute;
	width: 300px;
	height: 300px;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: #fff;
	padding: 20px;
	box-sizing: border-box;
	overflow: hidden;
}
.front-face {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #b71433;
	transition: width 0.2s ease-in-out;
	z-index: 2;
}
.login-form:hover .front-face, 
.login-form.focused .front-face {
	width: 30px;
}

.front-face>.text {
	font-size: 5rem;
	color: #fff;
	display: block;
	text-align: center;
	line-height: 300px;
	transition: all 0.2s ease-in-out
}
.login-form:hover .front-face .text,
.login-form.focused .front-face .text
 {
	font-size: 1rem;
	transform: rotate(-90deg);
}
.login-form form {
	width: 200px;
	margin: 0 auto;
}
.login-form form .input {
	width: 100%;
	height: 50px;
	border:0;
	border-bottom:2px solid #b71433;
	color: #b71433;
	outline: none;
}
.input-btn {
	width: 70px;
	height: 70px;
	position: absolute;
	right: 15px;
	bottom: 15px;
	z-index: 1;
	background-color: #b71433;
	border-radius: 50%;
	outline: none;
	border:5px solid transparent;
	transition: all 0.2s ease-in-out;
}
.input-btn:after {
	content: "";
	position: absolute;
	width: 0;
	height: 0;
	border-left: 30px solid transparent;
	border-right: 30px solid #fff;
	border-bottom: 30px solid transparent;
	left: -17px;
	top: 5px;
	transform: rotate(45deg);
	transition: all 0.2s ease-in-out;
}
.input-btn:hover,
.input-btn:focus,
.input-btn:active
 {
	background-color: #fff;
	border:5px solid #b71433;
}
.input-btn:hover:after,
.input-btn:focus:after,
.input-btn:active:after
{
	border-right: 30px solid #b71433;
}
.login-form .front-face .loader {
	position: absolute;
	width: 150px;
	height: 150px;
	border-radius: 50%;
	border: 2px solid #fff;
	margin: 75px 76px;
	animation: load 2s linear infinite;

}
.login-form .front-face .loader:after {
	content: "";
	position: absolute;
    top: -11px;
    left: 67px;	
	width: 20px;
	height: 20px;
	background-color: #fff;
	border-radius: 50%;

}

.login-form.loading .front-face .text {
	display: none;
}
.login-form.loading .front-face {
	width: 100%;
}
.login-form.loading .loader {
	display: block;
}

@keyframes load {
	50% {
		opacity: 0.5%
	}
	100% {
		transform: rotate(360deg);
	}
}
JS
$(document).ready(function(){

	$('.input').on("focus", function() {
		$(".login-form").addClass("focused");
	});

	$('.input-btn').on('click', function(e){
		e.preventDefault();
		$(".login-form").removeClass("focused").addClass("loading");
	});
});
Host Instantly Drag and Drop Website Builder

 

Description

Animated Login Form By Using HTML, CSS3, jQuey
Term
Tue, 12/26/2017 - 09:47

Related Codes

Pen ID
Pen ID
Pen ID