Skip to content

Instantly share code, notes, and snippets.

@smokinjoe
Created June 25, 2013 20:06
Show Gist options
  • Save smokinjoe/5861897 to your computer and use it in GitHub Desktop.
Save smokinjoe/5861897 to your computer and use it in GitHub Desktop.
Simple way to create a 'bounce' effect with css's keyframes
.myBounceDiv {
-moz-animation:bounce .40s linear;
-webkit-animation:bounce .40s linear;
}
@-moz-keyframes bounce {
0%{ -moz-transform:scale(0); opacity:0;}
50%{ -moz-transform:scale(1.3); opacity:0.4; }
75%{ -moz-transform:scale(0.9); opacity:0.7;}
100%{ -moz-transform:scale(1); opacity:1;}
}
@-webkit-keyframes bounce {
0%{ -webkit-transform:scale(0); opacity:0;}
50%{ -webkit-transform:scale(1.3); opacity:0.4;}
75%{ -webkit-transform:scale(0.9); opacity:0.7;}
100%{ -webkit-transform:scale(1); opacity:1;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment