-
-
Save theStrangeAdventurer/6c12a595e0030234c366c12069f2a1dc to your computer and use it in GitHub Desktop.
Shake infinite animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.element { | |
-webkit-animation: shake; | |
animation: shake; | |
-webkit-animation-iteration-count: infinite; | |
animation-iteration-count: infinite; | |
-webkit-animation-duration: 4s; | |
animation-duration: 4s; | |
-webkit-animation-timing-function: cubic-bezier(0.36, 0.07, 0.19, 0.97); | |
animation-timing-function: cubic-bezier(0.36, 0.07, 0.19, 0.97); | |
-webkit-animation-delay: 4s; | |
animation-delay: 4s; | |
} | |
@-webkit-keyframes shake { | |
2%, 18% { | |
-webkit-transform: translate3d(-1px, 0, 0); | |
transform: translate3d(-1px, 0, 0); | |
} | |
4%, 16% { | |
-webkit-transform: translate3d(2px, 0, 0); | |
transform: translate3d(2px, 0, 0); | |
} | |
6%, 10%, 14% { | |
-webkit-transform: translate3d(-4px, 0, 0); | |
transform: translate3d(-4px, 0, 0); | |
} | |
8%, 12% { | |
-webkit-transform: translate3d(4px, 0, 0); | |
transform: translate3d(4px, 0, 0); | |
} | |
20%, 100% { | |
-webkit-transform: translate3d(0, 0, 0); | |
transform: translate3d(0, 0, 0); | |
} | |
} | |
@keyframes shake { | |
2%, 18% { | |
-webkit-transform: translate3d(-1px, 0, 0); | |
transform: translate3d(-1px, 0, 0); | |
} | |
4%, 16% { | |
-webkit-transform: translate3d(2px, 0, 0); | |
transform: translate3d(2px, 0, 0); | |
} | |
6%, 10%, 14% { | |
-webkit-transform: translate3d(-4px, 0, 0); | |
transform: translate3d(-4px, 0, 0); | |
} | |
8%, 12% { | |
-webkit-transform: translate3d(4px, 0, 0); | |
transform: translate3d(4px, 0, 0); | |
} | |
20%, 100% { | |
-webkit-transform: translate3d(0, 0, 0); | |
transform: translate3d(0, 0, 0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment