Skip to content

Instantly share code, notes, and snippets.

@colbyfayock
Created May 2, 2020 19:43
Show Gist options
  • Save colbyfayock/d155418975d1e0e04b2805e285296033 to your computer and use it in GitHub Desktop.
Save colbyfayock/d155418975d1e0e04b2805e285296033 to your computer and use it in GitHub Desktop.
CSS Loading Animation
/**
* Loading Animation Snippet
*/
.loading {
color: transparent;
background: linear-gradient(100deg, #eceff1 30%, #f6f7f8 50%, #eceff1 70%);
background-size: 400%;
animation: loading 1.2s ease-in-out infinite;
}
@keyframes loading {
0% {
background-position: 100% 50%;
}
100% {
background-position: 0 50%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment