Skip to content

Instantly share code, notes, and snippets.

@CodeMyUI
Created March 28, 2017 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodeMyUI/530e25ec020cfbfc68526a2a56cb0247 to your computer and use it in GitHub Desktop.
Save CodeMyUI/530e25ec020cfbfc68526a2a56cb0247 to your computer and use it in GitHub Desktop.
Animated Gradient Text
<h1 class="linear-wipe">Shine!</h1>
<script src="http://codepen.io/shshaw/pen/epmrgO"></script>
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