Last active
December 17, 2015 08:49
-
-
Save ysawa/5582615 to your computer and use it in GitHub Desktop.
iPhoneやiPadのブルブル震えるようなアイコンをCSS3で再現する。(MIT LICENSE)
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
@-webkit-keyframes shaky_animation | |
0% | |
+transform(rotate(0)) | |
25% | |
+transform(rotate(3deg)) | |
50% | |
+transform(rotate(0)) | |
75% | |
+transform(rotate(-3deg)) | |
.shaky_icon | |
+animation(shaky_animation .2s infinite) |
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
@-webkit-keyframes shaky_animation { | |
0% { | |
-webkit-transform: rotate(0); | |
-moz-transform: rotate(0); | |
-ms-transform: rotate(0); | |
-o-transform: rotate(0); | |
transform: rotate(0); | |
} | |
25% { | |
-webkit-transform: rotate(3deg); | |
-moz-transform: rotate(3deg); | |
-ms-transform: rotate(3deg); | |
-o-transform: rotate(3deg); | |
transform: rotate(3deg); | |
} | |
50% { | |
-webkit-transform: rotate(0); | |
-moz-transform: rotate(0); | |
-ms-transform: rotate(0); | |
-o-transform: rotate(0); | |
transform: rotate(0); | |
} | |
75% { | |
-webkit-transform: rotate(-3deg); | |
-moz-transform: rotate(-3deg); | |
-ms-transform: rotate(-3deg); | |
-o-transform: rotate(-3deg); | |
transform: rotate(-3deg); | |
} | |
} | |
.shaky_icon { | |
-webkit-animation: shaky_animation 0.2s infinite; | |
-moz-animation: shaky_animation 0.2s infinite; | |
animation: shaky_animation 0.2s infinite; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment