Created
March 28, 2017 23:16
-
-
Save CodeMyUI/530e25ec020cfbfc68526a2a56cb0247 to your computer and use it in GitHub Desktop.
Animated Gradient Text
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
<h1 class="linear-wipe">Shine!</h1> |
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
<script src="http://codepen.io/shshaw/pen/epmrgO"></script> |
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
html { height: 100%; } | |
body { | |
background: #333; | |
text-align: center; | |
min-height: 100%; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} | |
h1 { font-size: 20vw; } | |
.linear-wipe { | |
text-align: center; | |
background: linear-gradient(to right, #FFF 20%, #FF0 40%, #FF0 60%, #FFF 80%); | |
background-size: 200% auto; | |
color: #000; | |
background-clip: text; | |
text-fill-color: transparent; | |
-webkit-background-clip: text; | |
-webkit-text-fill-color: transparent; | |
animation: shine 1s linear infinite; | |
@keyframes shine { | |
to { | |
background-position: 200% center; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment