A Pen by Matt Daniel Brown on CodePen.
Created
December 2, 2020 19:32
-
-
Save matt-daniel-brown/974f7732d53b902cfc02db86acb30300 to your computer and use it in GitHub Desktop.
CSS Gradients: Animated Gradient
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
<div class="gradient-pattern"></div> |
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
body { | |
height: 100vh; | |
} | |
.gradient-pattern { | |
animation: gradient 4s ease infinite; | |
background-image: linear-gradient(135deg, #ff8a00, #e52e71); | |
background-size: 400% 400%; | |
height: 100%; | |
width: 100%; | |
} | |
@keyframes gradient { | |
0% { | |
background-position: 51% 0%; | |
} | |
50% { | |
background-position: 50% 100%; | |
} | |
100% { | |
background-position: 51% 0%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment