Created
April 6, 2019 11:55
-
-
Save Jamiewarb/76ccf8dd00bc1f9ffeba063bf2e0b2fe to your computer and use it in GitHub Desktop.
Animated Repeating Gradient
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
| /** | |
| * 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