A Pen by Manuel Pinto on CodePen.
Created
December 31, 2018 11:38
-
-
Save gsputnik/0b7bd9eee20b31781020db3b570fc59b to your computer and use it in GitHub Desktop.
Pure CSS3 Gradient Background Animation
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
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300" type="text/css" /> | |
<h1>Pure CSS3 Animated Gradient Background</h1> |
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
// Pure CSS - No JS |
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
body { | |
width: 100wh; | |
height: 90vh; | |
color: #fff; | |
background: linear-gradient(-45deg, #EE7752, #E73C7E, #23A6D5, #23D5AB); | |
background-size: 400% 400%; | |
-webkit-animation: Gradient 15s ease infinite; | |
-moz-animation: Gradient 15s ease infinite; | |
animation: Gradient 15s ease infinite; | |
} | |
@-webkit-keyframes Gradient { | |
0% { | |
background-position: 0% 50% | |
} | |
50% { | |
background-position: 100% 50% | |
} | |
100% { | |
background-position: 0% 50% | |
} | |
} | |
@-moz-keyframes Gradient { | |
0% { | |
background-position: 0% 50% | |
} | |
50% { | |
background-position: 100% 50% | |
} | |
100% { | |
background-position: 0% 50% | |
} | |
} | |
@keyframes Gradient { | |
0% { | |
background-position: 0% 50% | |
} | |
50% { | |
background-position: 100% 50% | |
} | |
100% { | |
background-position: 0% 50% | |
} | |
} | |
h1, | |
h6 { | |
font-family: 'Open Sans'; | |
font-weight: 300; | |
text-align: center; | |
position: absolute; | |
top: 45%; | |
right: 0; | |
left: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment