Skip to content

Instantly share code, notes, and snippets.

@baseplate-admin
Created December 12, 2020 20:33
Show Gist options
  • Save baseplate-admin/97f3ac1ac6162cd8bddeedf068a51b30 to your computer and use it in GitHub Desktop.
Save baseplate-admin/97f3ac1ac6162cd8bddeedf068a51b30 to your computer and use it in GitHub Desktop.
Rotating CSS
@-webkit-keyframes rotating /* Safari and Chrome */ {
from {
-webkit-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes rotating {
from {
-ms-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
-o-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
-ms-transform: rotate(360deg);
-moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg);
-o-transform: rotate(360deg);
transform: rotate(360deg);
}
}
.rotating {
-webkit-animation: rotating 2s linear infinite;
-moz-animation: rotating 2s linear infinite;
-ms-animation: rotating 2s linear infinite;
-o-animation: rotating 2s linear infinite;
animation: rotating 2s linear infinite;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment