-
-
Save LeetCodes/4eca3dfcbbe56479a2c248904e7ee73b to your computer and use it in GitHub Desktop.
Infinite rotation by CSS. Useful for loading spinners.
This file contains hidden or 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
| @keyframes rotating | |
| { | |
| from | |
| { | |
| transform: rotate(0deg); | |
| -o-transform: rotate(0deg); | |
| -ms-transform: rotate(0deg); | |
| -moz-transform: rotate(0deg); | |
| -webkit-transform: rotate(0deg); | |
| } | |
| to | |
| { | |
| transform: rotate(360deg); | |
| -o-transform: rotate(360deg); | |
| -ms-transform: rotate(360deg); | |
| -moz-transform: rotate(360deg); | |
| -webkit-transform: rotate(360deg); | |
| } | |
| } | |
| @-webkit-keyframes rotating | |
| { | |
| from | |
| { | |
| transform: rotate(0deg); | |
| -webkit-transform: rotate(0deg); | |
| } | |
| to | |
| { | |
| transform: rotate(360deg); | |
| -webkit-transform: rotate(360deg); | |
| } | |
| } | |
| .rotating | |
| { | |
| -webkit-animation: rotating 1s linear infinite; | |
| -moz-animation: rotating 1s linear infinite; | |
| -ms-animation: rotating 1s linear infinite; | |
| -o-animation: rotating 1s linear infinite; | |
| animation: rotating 1s linear infinite; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment