Skip to content

Instantly share code, notes, and snippets.

@Jamiewarb
Created April 6, 2019 11:55
Show Gist options
  • Select an option

  • Save Jamiewarb/76ccf8dd00bc1f9ffeba063bf2e0b2fe to your computer and use it in GitHub Desktop.

Select an option

Save Jamiewarb/76ccf8dd00bc1f9ffeba063bf2e0b2fe to your computer and use it in GitHub Desktop.
Animated Repeating Gradient
/**
* CSS Animated Repeating Gradient
*/
body {
background: repeating-linear-gradient(-45deg,black,black 20px,white 20px,white 40px);
background-size: 56px 56px; /* This is unique for this background, need to find a pattern and develop a formula */
-webkit-animation: slide 20s infinite linear forwards;
-moz-animation: slide 20s infinite linear forwards;
animation: slide 20s infinite linear forwards;
}
@-webkit-keyframes slide {
0% { background-position: 0% 0; }
100% { background-position: 100% 0; }
}
@-moz-keyframes slide {
0% { background-position: 0% 0; }
100% { background-position: 100% 0; }
}
@keyframes slide {
0% { background-position: 0% 0; }
100% { background-position: 100% 0; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment