LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code



  
  Card Animation




  
John Geek
CSS
@import url(https://fonts.googleapis.com/css?family=Montserrat:400,700);
/*VARS*/
/*MIXINS*/
body {
  background-color: #FFDDAC;
  font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif;
  overflow-x: hidden;
}

.ball {
  position: relative;
  width: 220px;
  height: 220px;
  padding: 10px;
  margin: 0 auto;
  margin-top: 100px;
  top: -200px;
  background-color: #fff;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  border-radius: 50%;
  -webkit-animation: bounce 1.4s forwards;
  -moz-animation: bounce 1.4s forwards;
  animation: bounce 1.4s forwards;
  -webkit-transform-origin: center center;
  -moz-transform-origin: center center;
  -ms-transform-origin: center center;
  -o-transform-origin: center center;
  transform-origin: center center;
}

@-webkit-keyframes bounce {
  0% {
    top: -200px;
    height: 220px;
    -webkit-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
  }
  25% {
    top: 190px;
    height: 155px;
    -webkit-animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
  }
  45% {
    top: -100px;
    width: 220px;
    height: 220px;
    -webkit-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
  }
  80% {
    top: 190px;
    height: 155px;
    -webkit-animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
  }
  85% {
    top: -100px;
    width: 220px;
    height: 220px;
    -webkit-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
  }
}
@-moz-keyframes bounce {
  0% {
    top: -200px;
    height: 220px;
    -moz-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
  }
  25% {
    top: 190px;
    height: 155px;
    -moz-animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
  }
  45% {
    top: -100px;
    width: 220px;
    height: 220px;
    -moz-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
  }
  80% {
    top: 190px;
    height: 155px;
    -moz-animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
  }
  85% {
    top: -100px;
    width: 220px;
    height: 220px;
    -moz-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
  }
}
@keyframes bounce {
  0% {
    top: -200px;
    height: 220px;
    -webkit-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
    -moz-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
    animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
  }
  25% {
    top: 190px;
    height: 155px;
    -webkit-animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    -moz-animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
  }
  45% {
    top: -100px;
    width: 220px;
    height: 220px;
    -webkit-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
    -moz-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
    animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
  }
  80% {
    top: 190px;
    height: 155px;
    -webkit-animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    -moz-animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
    animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
  }
  85% {
    top: -100px;
    width: 220px;
    height: 220px;
    -webkit-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
    -moz-animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
    animation-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
  }
}
/******************************************************* 
	
 * User photo animation

*******************************************************/
@-webkit-keyframes expand {
  0% {
    top: 0px;
    -webkit-transform: rotate(0deg);
  }
  100% {
    height: 320px;
    top: 0px;
    -webkit-transform: rotate(360deg);
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    border-radius: 10px;
    -webkit-transition: all 0.2s forwards;
  }
}
@-moz-keyframes expand {
  0% {
    top: 0px;
    -moz-transform: rotate(0deg);
  }
  100% {
    height: 320px;
    top: 0px;
    -moz-transform: rotate(360deg);
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    border-radius: 10px;
    -moz-transition: all 0.2s forwards;
  }
}
@keyframes expand {
  0% {
    top: 0px;
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    height: 320px;
    top: 0px;
    -webkit-transform: rotate(360deg);
    -moz-transform: rotate(360deg);
    -ms-transform: rotate(360deg);
    -o-transform: rotate(360deg);
    transform: rotate(360deg);
    -webkit-border-radius: 10px;
    -moz-border-radius: 10px;
    -ms-border-radius: 10px;
    border-radius: 10px;
    -webkit-transition: all 0.2s forwards;
    -moz-transition: all 0.2s forwards;
    transition: all 0.2s forwards;
  }
}
.scale {
  -webkit-animation: expand .3s 1 forwards;
  -moz-animation: expand .3s 1 forwards;
  -ms-animation: expand .3s 1 forwards;
  animation: expand .3s 1 forwards;
}

.user-photo {
  position: relative;
  max-width: 140px;
  height: 140px;
  margin: 20px auto;
  background-color: #b2e3ef;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  border-radius: 50%;
  -webkit-transform: scale(0.5);
  -moz-transform: scale(0.5);
  -ms-transform: scale(0.5);
  -o-transform: scale(0.5);
  transform: scale(0.5);
  -webkit-transform-origin: center center;
  -moz-transform-origin: center center;
  -ms-transform-origin: center center;
  -o-transform-origin: center center;
  transform-origin: center center;
  opacity: 0;
  overflow: hidden;
}

@-webkit-keyframes scaleUser {
  0% {
    opacity: 0;
    -webkit-transform: scale(0.5);
  }
  50% {
    opacity: 1;
    -webkit-transform: scale(1.2);
  }
  100% {
    opacity: 1;
    -webkit-transform: scale(1);
  }
}
@-moz-keyframes scaleUser {
  0% {
    opacity: 0;
    -moz-transform: scale(0.5);
  }
  50% {
    opacity: 1;
    -moz-transform: scale(1.2);
  }
  100% {
    opacity: 1;
    -moz-transform: scale(1);
  }
}
@keyframes scaleUser {
  0% {
    opacity: 0;
    -webkit-transform: scale(0.5);
    -moz-transform: scale(0.5);
    -ms-transform: scale(0.5);
    -o-transform: scale(0.5);
    transform: scale(0.5);
  }
  50% {
    opacity: 1;
    -webkit-transform: scale(1.2);
    -moz-transform: scale(1.2);
    -ms-transform: scale(1.2);
    -o-transform: scale(1.2);
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -ms-transform: scale(1);
    -o-transform: scale(1);
    transform: scale(1);
  }
}
.user-photo-animate {
  -webkit-animation: scaleUser 0.3s 1 forwards;
  -moz-animation: scaleUser 0.3s 1 forwards;
  animation: scaleUser 0.3s 1 forwards;
}

.user-photo-mask {
  position: absolute;
  top: -80px;
  width: 188px;
  height: 249px;
  left: 25px;
  overflow: hidden;
  text-align: center;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  -ms-border-radius: 50%;
  border-radius: 50%;
}

@-webkit-keyframes moveUser {
  0% {
    bottom: -220px;
  }
  100% {
    bottom: -30px;
  }
}
@-moz-keyframes moveUser {
  0% {
    bottom: -220px;
  }
  100% {
    bottom: -30px;
  }
}
@keyframes moveUser {
  0% {
    bottom: -220px;
  }
  100% {
    bottom: -30px;
  }
}
.user-photo-mask > img {
  position: relative;
  bottom: -220px;
}

.user-img {
  -webkit-animation: moveUser 0.3s 1 forwards;
  -moz-animation: moveUser 0.3s 1 forwards;
  animation: moveUser 0.3s 1 forwards;
}

.user-name {
  width: 100%;
  text-align: center;
  opacity: 0;
}

.user-name > h5 {
  font-family: "Montserrat";
  font-weight: "900";
  color: #ff7d04;
  font-size: 25px;
  margin: 0px;
}

.animated {
  -webkit-animation-duration: 1s;
  -moz-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  -moz-animation-fill-mode: both;
  animation-fill-mode: both;
}

@-webkit-keyframes fadeInUp {
  0% {
    opacity: 0;
    -webkit-transform: translate3d(0, 100%, 0);
  }
  100% {
    opacity: 1;
    -webkit-transform: none;
  }
}
@-moz-keyframes fadeInUp {
  0% {
    opacity: 0;
    -moz-transform: translate3d(0, 100%, 0);
  }
  100% {
    opacity: 1;
    -moz-transform: none;
  }
}
@keyframes fadeInUp {
  0% {
    opacity: 0;
    -webkit-transform: translate3d(0, 100%, 0);
    -moz-transform: translate3d(0, 100%, 0);
    -ms-transform: translate3d(0, 100%, 0);
    -o-transform: translate3d(0, 100%, 0);
    transform: translate3d(0, 100%, 0);
  }
  100% {
    opacity: 1;
    -webkit-transform: none;
    -moz-transform: none;
    -ms-transform: none;
    -o-transform: none;
    transform: none;
  }
}
.fadeInUp {
  -webkit-animation-name: fadeInUp;
  -moz-animation-name: fadeInUp;
  animation-name: fadeInUp;
}

/************************************

 * Draw Lines

************************************/
ul.lines {
  position: relative;
  max-width: 150px;
  margin: 0 auto;
  padding: 0px;
}

ul.lines > li {
  list-style: none;
  display: inline-block;
  margin-top: 16px;
  opacity: 0;
}

ul.lines > li:nth-child(1) {
  width: 100%;
  height: 2px;
  border-bottom: 2px solid #CACACA;
}

ul.lines > li:nth-child(2) {
  width: 100%;
  height: 2px;
  border-bottom: 2px solid #CACACA;
}

ul.lines > li:nth-child(3) {
  width: 90px;
  height: 2px;
  border-bottom: 2px solid #CACACA;
}

/************************************

 * FOOTER

************************************/
footer {
  position: fixed;
  padding: 0px 20px 20px 0px;
  bottom: 0px;
  right: 0px;
}
footer .inspiration {
  width: 100%;
  text-align: right;
  margin-bottom: 2px;
  font-family: "Montserrat";
  font-size: 12px;
  opacity: .6;
}
footer .inspiration a {
  color: #000;
  text-decoration: none;
}
footer .inspiration a:hover {
  color: #ff7d04;
  text-decoration: underline;
}
footer .copyright {
  text-align: right;
  font-family: "Montserrat";
  font-size: 12px;
}
footer .copyright {
  text-align: right;
  font-family: "Montserrat";
  font-size: 12px;
}
footer .copyright a {
  color: #000;
  text-decoration: none;
}
footer .copyright a:hover {
  color: #ff7d04;
  text-decoration: underline;
}
JS
$(document).ready(function() {

  setTimeout(function() {
    $('.ball').addClass('scale');
  }, 1000);

  setTimeout(function() {
    $('.user-photo').addClass('user-photo-animate');
  }, 1200);

  setTimeout(function() {
    $('.user-photo-mask > img').addClass('user-img');
    $('.user-photo-mask > img').addClass('user-img');
  }, 1400);

  setTimeout(function() {
    $('.user-name').addClass('fadeInUp');
  }, 1500);

  setTimeout(function() {

    var children = $("ul.lines > li");
    var index = 0;
    //console.log(children);

    function addClassNextChild() {
      if (index == children.length) return;
      children.eq(index++).addClass('fadeInUp');
      window.setTimeout(addClassNextChild, 200);
    }
    addClassNextChild();
  }, 1600);

}); //end Document ready
Term
Mon, 11/27/2017 - 21:25

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv