Skip to content

Instantly share code, notes, and snippets.

@ivo-ivanov
Last active March 7, 2021 14:45
Show Gist options
  • Save ivo-ivanov/39f40a3ea0e973f7e280536f2d114311 to your computer and use it in GitHub Desktop.
Save ivo-ivanov/39f40a3ea0e973f7e280536f2d114311 to your computer and use it in GitHub Desktop.
Bounce CSS Animation #css
@-moz-keyframes bounce {
0%, 20%, 50%, 80%, 100% {
-moz-transform: translateY(0);
transform: translateY(0);
}
40% {
-moz-transform: translateY(-10px);
transform: translateY(-10px);
}
60% {
-moz-transform: translateY(-5px);
transform: translateY(-5px);
}
}
@-webkit-keyframes bounce {
0%, 20%, 50%, 80%, 100% {
-webkit-transform: translateY(0);
transform: translateY(0);
}
40% {
-webkit-transform: translateY(-10px);
transform: translateY(-10px);
}
60% {
-webkit-transform: translateY(-5px);
transform: translateY(-5px);
}
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {
-moz-transform: translateY(0);
-ms-transform: translateY(0);
-webkit-transform: translateY(0);
transform: translateY(0);
}
40% {
-moz-transform: translateY(-10px);
-ms-transform: translateY(-10px);
-webkit-transform: translateY(-10px);
transform: translateY(-10px);
}
60% {
-moz-transform: translateY(-5px);
-ms-transform: translateY(-5px);
-webkit-transform: translateY(-5px);
transform: translateY(-5px);
}
}
.bounce {
-moz-animation: bounce 2s infinite;
-webkit-animation: bounce 2s infinite;
animation: bounce 2s infinite;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment