Skip to content

Instantly share code, notes, and snippets.

@tiger8888
Forked from smokinjoe/gist:5861897
Created February 20, 2019 10:39
Show Gist options
  • Save tiger8888/b9e248035a86c9a87076dd7d7a00185b to your computer and use it in GitHub Desktop.
Save tiger8888/b9e248035a86c9a87076dd7d7a00185b 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