Skip to content

Instantly share code, notes, and snippets.

@Hatteron
Created October 12, 2017 08:10
Show Gist options
  • Save Hatteron/1f2e955a83af2af52c8ccce0fc8b9abd to your computer and use it in GitHub Desktop.
Save Hatteron/1f2e955a83af2af52c8ccce0fc8b9abd to your computer and use it in GitHub Desktop.
// CSS Create Animation
@keyframes tossing {
0% {
transform: rotate(-30deg);
}
50% {
transform: rotate(30deg);
}
100% {
transform: rotate(-30deg);
}
}
@-webkit-keyframes tossing {
0% {
-webkit-transform: rotate(-30deg);
}
50% {
-webkit-transform: rotate(30deg);
}
100% {
-webkit-transform: rotate(-30deg);
}
}
// CSS Class
.tossing{
animation-name: tossing;
-webkit-animation-name: tossing;
animation-duration: 5s;
-webkit-animation-duration: 5s;
animation-iteration-count: infinite;
-webkit-animation-iteration-count: infinite;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment