Created
August 3, 2020 03:20
-
-
Save multimeric/6704a0dce45349210ddb9e7f61c09ae2 to your computer and use it in GitHub Desktop.
A simple CSS rule to make the entire page spin constantly in the browser
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
/* | |
Tells the body to apply the "spin" animation. | |
Change the `2s` to alter the speed. | |
Also change the selector from `body` to some other selector to target something else | |
*/ | |
body { | |
animation: spin 2s infinite linear | |
} | |
/* | |
Defines the "spin" animation as a rotation from 0 degrees to 360 degrees | |
*/ | |
@keyframes spin { | |
from { | |
transform: rotate(0deg) | |
} | |
to { | |
transform: rotate(360deg) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment