Skip to content

Instantly share code, notes, and snippets.

@multimeric
Created August 3, 2020 03:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save multimeric/6704a0dce45349210ddb9e7f61c09ae2 to your computer and use it in GitHub Desktop.
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
/*
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