An animated multicolor background using CSS.
Created
March 28, 2017 03:12
-
-
Save thetypebeast/4bf1b3f21d945693f1677ff94172fcc8 to your computer and use it in GitHub Desktop.
Animated Background
This file contains 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
* { /* reset margins and paddings on all elements */ | |
margin:0; | |
padding:0; | |
} | |
body::before { | |
content:""; /* required for ::before */ | |
position:fixed; /* don't scroll with page */ | |
z-index:-100; /* place behind elements on page */ | |
width:100%; | |
height:100%; | |
background-color:#14C2CC; | |
background-image: | |
radial-gradient(circle farthest-side at top right, transparent, #0D64FF), radial-gradient(ellipse farthest-corner at 0% 100%, transparent, #FF00A0); | |
animation:bg-change 10s infinite; | |
} | |
@keyframes bg-change { | |
0%, 100% { | |
filter:hue-rotate(0deg); | |
} | |
50% { | |
filter:hue-rotate(-45deg); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment