Skip to content

Instantly share code, notes, and snippets.

@bdelaney
Created September 24, 2015 14:07
Show Gist options
  • Save bdelaney/34fedeedba4f71e6b7bf to your computer and use it in GitHub Desktop.
Save bdelaney/34fedeedba4f71e6b7bf to your computer and use it in GitHub Desktop.
CSS for color fade gradient as background
background: linear-gradient(325deg, #3498db, #242c66);
background-size: 400% 400%;
-webkit-animation: AnimationName 14s ease infinite;
-moz-animation: AnimationName 14s ease infinite;
-o-animation: AnimationName 14s ease infinite;
animation: AnimationName 14s ease infinite;
@-webkit-keyframes AnimationName {
0%{background-position:10% 0%}
50%{background-position:91% 100%}
100%{background-position:10% 0%}
}
@-moz-keyframes AnimationName {
0%{background-position:10% 0%}
50%{background-position:91% 100%}
100%{background-position:10% 0%}
}
@-o-keyframes AnimationName {
0%{background-position:10% 0%}
50%{background-position:91% 100%}
100%{background-position:10% 0%}
}
@keyframes AnimationName {
0%{background-position:10% 0%}
50%{background-position:91% 100%}
100%{background-position:10% 0%}
}
background: linear-gradient(325deg, #3498db, #242c66, #73128b);
background-size: 600% 600%;
-webkit-animation: AnimationName 7s ease infinite;
-moz-animation: AnimationName 7s ease infinite;
-o-animation: AnimationName 7s ease infinite;
animation: AnimationName 7s ease infinite;
@-webkit-keyframes AnimationName {
0%{background-position:10% 0%}
50%{background-position:91% 100%}
100%{background-position:10% 0%}
}
@-moz-keyframes AnimationName {
0%{background-position:10% 0%}
50%{background-position:91% 100%}
100%{background-position:10% 0%}
}
@-o-keyframes AnimationName {
0%{background-position:10% 0%}
50%{background-position:91% 100%}
100%{background-position:10% 0%}
}
@keyframes AnimationName {
0%{background-position:10% 0%}
50%{background-position:91% 100%}
100%{background-position:10% 0%}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment