LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

Code
 

Bounce Effect

Simple border/shadow/scale animation done with css animations (Way ol' project)

CSS
@import url(https://fonts.googleapis.com/css?family=Ubuntu);
body,
html {
  background: #1d1d1d;
  font-family: 'Helvetica', sans-serif;
  color: white;
  text-align: center;
  padding: 0;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  text-rendering: optimizeLegibility;
}

h1 {
  position: absolute;
  white-space: nowrap;
  left: 50%;
  top: 15%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  opacity: .035;
  font-size: 16vw;
  font-weight: bold;
}

p {
  font-size: 120%;
  font-family: 'Apple Symbols';
  line-height: 1.28;
  -webkit-transform: translateY(30px);
          transform: translateY(30px);
  letter-spacing: .5px;
  opacity: .3;
  max-width: 340px;
}

body {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  height: 100vh;
  width: 100vw;
}

.avatar {
  margin: 25px auto;
}

img.user {
  height: 200px;
  width: 200px;
  background-color: #777;
  box-shadow: 0 0 0 5px #777;
  border-radius: 50%;
  will-change: transform;
}
img.user:hover {
  cursor: pointer;
  -webkit-animation: bounceOut 0.4s linear;
          animation: bounceOut 0.4s linear;
}

@-webkit-keyframes bounceOut {
  0% {
    box-shadow: 0 0 0 4px #777;
    opacity: 1;
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  25% {
    box-shadow: 0 0 0 1px #777;
    opacity: 1;
    -webkit-transform: scale(0.97);
            transform: scale(0.97);
  }
  50% {
    box-shadow: 0 0 0 7px #777;
    opacity: 1;
    -webkit-transform: scale(1.01);
            transform: scale(1.01);
  }
  75% {
    box-shadow: 0 0 0 4px #777;
    opacity: 1;
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  100% {
    box-shadow: 0 0 0 5px #777;
    opacity: 1;
  }
}

@keyframes bounceOut {
  0% {
    box-shadow: 0 0 0 4px #777;
    opacity: 1;
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  25% {
    box-shadow: 0 0 0 1px #777;
    opacity: 1;
    -webkit-transform: scale(0.97);
            transform: scale(0.97);
  }
  50% {
    box-shadow: 0 0 0 7px #777;
    opacity: 1;
    -webkit-transform: scale(1.01);
            transform: scale(1.01);
  }
  75% {
    box-shadow: 0 0 0 4px #777;
    opacity: 1;
    -webkit-transform: scale(1);
            transform: scale(1);
  }
  100% {
    box-shadow: 0 0 0 5px #777;
    opacity: 1;
  }
}
JS
// Updated pen from 2010
Host Instantly Drag and Drop Website Builder

 

Description

Simple bounce effect made with css3 keyframe animation // @simonbusborg on twitter
Term
Mon, 11/27/2017 - 21:52

Related Codes

Pen ID
Pen ID
Pen ID