LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code


Login to continue.....
CSS
@import url("https://fonts.googleapis.com/css?family=ShadowsIntoLight");
body {
  margin: 0;
}
* {
  font-family: 'Shadows Into Light', cursive;
}
.container {
  display: flex;
  margin: 0;
}
.loginPage {
  background-color: #1d222a;
  color: #101010;
  height: 100vh;
  overflow: hidden;
  width: 100vw;
  border-top: 1px solid #f0f0f1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.loginCard {
  width: 285px;
  height: 450px;
  background-color: #2b323d;
  border-radius: 10px;
  overflow: hidden;
  color: #fefefe;
}
.cardTopSkew {
  width: 200%;
  margin-left: -60px;
  margin-top: -50px;
  height: 40%;
  background-color: #56d391;
  transform: rotate(6deg);
  box-shadow: 0px 2.5px 8px 0px #2a2a2a;
}
.cardTopSkew:after {
  content: "Welcome";
  position: absolute;
  margin-top: 100px;
  margin-left: 150px;
  color: #fefefe;
  font-size: 2rem;
  transform: rotate(-6deg);
}
.loginSection {
  width: 100%;
}
.loginSection span {
  font-size: 1.3rem;
  text-align: center;
  width: 180px;
  line-height: 150px;
  margin-left: calc(50% - 70px);
}
.loginButton {
  background-color: #2e4688;
  width: 60px;
  height: 60px;
  margin-left: calc(50% - 30px);
  border-radius: 30px;
  box-shadow: 0px 0px 10px 0px #1a1a1a;
  transition: all 0.2s ease;
}
.loginButton div {
  width: 4px;
  height: 20px;
  display: inline-block;
  position: absolute;
  background-color: #fafafa;
  margin-top: 20px;
  left: calc(50% - 29px);
  opacity: 0;
}
.loginButton div:nth-child(1) {
  margin-left: 9px;
}
.loginButton div:nth-child(2) {
  margin-left: 18px;
}
.loginButton div:nth-child(3) {
  margin-left: 27px;
}
.loginButton div:nth-child(4) {
  margin-left: 36px;
}
.loginButton div:nth-child(5) {
  margin-left: 45px;
}
.loginButton:before {
  content: 'Login';
  position: absolute;
  font-family: 'Shadows Into Light', cursive;
  left: calc(50% - 15px);
  font-size: 1.3rem;
  line-height: 60px;
  opacity: 0;
  transition: all 0.2s ease;
}
.loginButton:after {
  position: absolute;
  font-family: FontAwesome;
  content: "\f09a";
  font-size: 2.5em;
  margin-top: 50px;
  left: calc(50% - 12.5px);
  margin-top: calc(25px - 12px);
  transition: all 0.2s ease;
}
.loginButton:hover {
  cursor: pointer;
  width: 150px;
  border-radius: 30px;
  margin-left: calc(50% - 75px);
  transition: all 0.5s ease;
}
.loginButton:hover:before {
  opacity: 1;
  transition: all 0.2s 0.5s ease;
}
.loginButton:hover:after {
  left: calc(50% - 60px);
  transition: all 0.5s 0.2s ease;
}
.loginPending {
  background-color: #2e4688;
  height: 60px;
  border-radius: 30px;
  margin-left: calc(50% - 30px);
  box-shadow: 0px 0px 10px 0px #1a1a1a;
  width: 60px;
  text-align: center;
  transition: all 0.3s ease;
}
.loginPending div {
  width: 4px;
  height: 20px;
  display: inline-block;
  position: absolute;
  background-color: #fafafa;
  margin-top: 20px;
  left: calc(50% - 29px);
  opacity: 1;
  transition: opacity 5s 0.2s ease;
}
.loginPending div:nth-child(1) {
  animation: stretch 1.2s infinite;
  animation-delay: 0.1s;
  margin-left: 9px;
}
.loginPending div:nth-child(2) {
  animation: stretch 1.2s infinite;
  animation-delay: 0.2s;
  margin-left: 18px;
}
.loginPending div:nth-child(3) {
  animation: stretch 1.2s infinite;
  animation-delay: 0.3s;
  margin-left: 27px;
}
.loginPending div:nth-child(4) {
  animation: stretch 1.2s infinite;
  animation-delay: 0.4s;
  margin-left: 36px;
}
.loginPending div:nth-child(5) {
  animation: stretch 1.2s infinite;
  animation-delay: 0.5s;
  margin-left: 45px;
}
@-moz-keyframes stretch {
  0%, 40%, 100% {
    transform: scaleY(0.6);
  }
  20% {
    transform: scaleY(1.2);
  }
}
@-webkit-keyframes stretch {
  0%, 40%, 100% {
    transform: scaleY(0.6);
  }
  20% {
    transform: scaleY(1.2);
  }
}
@-o-keyframes stretch {
  0%, 40%, 100% {
    transform: scaleY(0.6);
  }
  20% {
    transform: scaleY(1.2);
  }
}
@keyframes stretch {
  0%, 40%, 100% {
    transform: scaleY(0.6);
  }
  20% {
    transform: scaleY(1.2);
  }
}
JS
document.querySelector(".loginButton").addEventListener('click', function() {
  document.querySelector(".loginButton").classList.add('loginPending')
  document.querySelector(".loginPending").classList.remove('loginButton')
  
  document.querySelector(".loginSection span").innerHTML = "Loading...Please wait";
  setTimeout(function() {
  document.querySelector(".loginPending").classList.add('loginButton'); document.querySelector(".loginButton").classList.remove('loginPending')
  document.querySelector(".loginSection span").innerHTML = "Success or Failed!";
    setTimeout(function() {
      document.querySelector(".loginSection span").innerHTML = "Login to continue.....";
    }, 3000)
  }, 6000)
});
Host Instantly Drag and Drop Website Builder

 

Term
Wed, 11/29/2017 - 11:25

Related Codes

Pen ID
Pen ID
Pen ID