<div class="container">
<div class="bg-img"></div>
<div class="header">
<div class="loading">
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
<div class="block"></div>
</div>
<h1>Go!</h1>
</div>
<div class="main">
<div class="login">
<form>
<input id="username" name="username" required="required" type="text" placeholder="Username" />
<input id="password" name="password" required="required" type="password" placeholder="Password" />
<button type="submit" value="Login" />Login</button>
<span class="form-toggle">Not Registered Yet?</span>
</form>
</div>
<div class="register">
<form>
<input id="firstname" name="firstname" required="required" type="text" placeholder="First name" />
<input id="lastname" name="lastname" required="required" type="text" placeholder="Last name" />
<input id="email" name="email" required="required" type="enail" placeholder="Email" />
<input id="username" name="username" required="required" type="text" placeholder="Username" />
<input id="password" name="password" required="required" type="password" placeholder="Password" />
<button type="submit" value="Login" />Register</button>
<span class="form-toggle">Return to Login</span>
</form>
</div>
</div>
<div class="footer">
<ul class="footer-nav">
<li class="link">FAQ</li>
<li class="link">About Us</li>
<li class="link">Contact Us</li>
<li class="link">Privacy Policy</li>
</ul>
<p class="disclaimer"><b>Disclaimer</b> Every effort is made to keep the website up and running smoothly. However, we takes no responsibility for, and will not be liable for, the website being temporarily unavailable due to technical issues beyond our control.</p>
</div>
</div>
@import "compass/css3";
@import url(https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300);
* {
font-family: 'Open Sans Condensed', sans-serif;
color:#464646;
transition: all 1.5s linear;
overflow:hidden !important; box-sizing:border-box; }
.container {
width:100%;
height:100%;
.bg-img {
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
opacity:0;
filter: blur(5px);
transform: scale(1.5);
img {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
min-width: 50%;
min-height: 50%;
}
}
}
.header {
position:absolute;
width:100%;
height:100%;
background-color:#464646;
display:table;
text-align:center;
color:#e2e8e7;
z-index:10;
h1 {
display: table-cell;
text-align: center;
vertical-align: middle;
font-size:72px;
z-index: 2;
position: relative;
color:#E2E8E7;
}
}
.main {
position:absolute;
width:100%;
height:100%;
.login, {
position:absolute;
background:#fff;
height:260px;
width:300px;
bottom:-520px;
left:50%;
margin-left:-150px;
box-shadow: 0 0 20px 2px #464646;
z-index:2;
}
.register {
position:absolute;
background:#fff;
height:440px;
width:300px;
bottom:-880px;
left:50%;
margin-left:-150px;
box-shadow: 0 0 20px 2px #464646;
z-index:2;
}
}
.form-toggle {
float:right;
color:#00B3A0;
font-size:14px;
line-height:24px;
}
.form-toggle:hover {
cursor:pointer;
}
.footer {
position:absolute;
top:100%;
left:0;
right:0;
bottom:0;
background-color:#e2e8e7;
.footer-nav {
list-style:none;
width:100%;
height:20%;
position:relative;
margin:0;
padding:0;
margin-top:100px;
text-align:center;
.link {
width:25%;
float:left;
border-left:1px solid #666666;
border-right:1px solid #464646;
&:first-child {
border-left-width:0;
}
&:last-child {
border-right-width:0;
}
}
}
}
.disclaimer {
font-size:12px;
text-align:center;
width:80%;
margin:12px auto;
padding:12px;
}
.container.loaded {
.loading {
display:none;
}
.bg-img {
opacity:1;
filter: blur(0);
transform: scale(1);
}
.header {
height:40px;
background-color:#00b3a0;
box-shadow: 0 0 20px 2px rgb(70, 70, 70);
h1 {
font-size:24px;
}
}
.main {
.login {
// Create an overlap on the footer
bottom: -webkit-calc(25% - 50px);
bottom: calc(25% - 50px);
}
}
.footer {
top:75%;
}
}
.register {
transition: all .5s linear;
}
.container.loaded.show-register {
.login {
box-shadow:0 0 0 0 transparent
}
.register {
// Create an overlap on the footer
bottom: -webkit-calc(25% - 50px);
bottom: calc(25% - 50px);
}
}
form {
padding:12px 24px 24px;
}
input {
margin:12px 0;
background-color: white;
background-image: none;
border: 0px dotted rgb(204, 204, 204);
border-bottom-width: 2px;
border-radius: 0;
box-shadow: 0 0 0 transparent inset;
color: rgb(204, 204, 204);
display: block;
font-size: 1.5em;
height: 2.0em;
line-height: 1.5;
padding: 0 12px;
transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
vertical-align: middle;
width: 100%;
}
button {
float:right;
font-size: 1.5em;
height: 2.0em;
line-height: 1.5;
margin: 12px 0;
padding: 0;
background-color:#00b3a0;
color:#e2e8e7;
border:0 none transparent;
width:100%;
text-align:center;
}
.loading {
width:150px;
height:150px;
position:absolute;
top:50%;
left:50%;
margin-top:-75px;
margin-left:-75px;
}
.loading .block {
width:40px;
height:40px;
/*border:5px solid #fff;*/
position:absolute;
}
.loading .block:nth-child(1) {
animation: top-left 3s infinite;
background-color:#00aacf ;
}
.loading .block:nth-child(2) {
animation: top-right 3s infinite;
background-color:#f6c574 ;
}
.loading .block:nth-child(3) {
animation: bottom-left 3s infinite;
background-color:#fc5652 ;
}
.loading .block:nth-child(4) {
animation: bottom-right 3s infinite;
background-color:#00b3a0 ;
}
@-webkit-keyframes top-left {
0% { left: 25px; top:25px; }
25% { left: 75px; top:25px; transform: rotate(90deg) }
50% { left: 75px; top: 75px; transform: rotate(180deg) }
75% { left: 25px; top: 75px; transform: rotate(270deg) }
100% { left: 25px; top: 25px; transform: rotate(360deg) }
}
@-webkit-keyframes top-right {
0% { left: 75px; top: 25px; }
25% { left: 75px; top: 75px; }
50% { left: 25px; top: 75px; }
75% { left: 25px; top: 25px; }
100% { left: 75px; top: 25px; }
}
@-webkit-keyframes bottom-left {
0% { left: 75px; top: 75px; }
25% { left: 25px; top: 75px; transform: rotate(90deg) }
50% { left: 25px; top: 25px; transform: rotate(180deg) }
75% { left: 75px; top: 25px; transform: rotate(270deg) }
100% { left: 75px; top: 75px; transform: rotate(360deg) }
}
@-webkit-keyframes bottom-right {
0% { left: 25px; top: 75px; }
25% { left: 25px; top: 25px; }
50% { left: 75px; top: 25px; }
75% { left: 75px; top: 75px; }
100% { left: 25px; top: 75px; }
}
View Compiled
$(function() {
$('<img/>').attr('src', 'http://lorempixel.com/1400/900/nature/3').load(function() {
$('.bg-img').append($(this));
// simulate loading
setTimeout(function() {
$('.container').addClass('loaded');
}, 1500)
//$(this).remove(); // prevent memory leaks as @benweet suggested
});
$('.form-toggle').on('click', function() {
$('.container').toggleClass('show-register')
})
})