Skip to content

Instantly share code, notes, and snippets.

Created January 22, 2014 15:35
Show Gist options
  • Save anonymous/8560854 to your computer and use it in GitHub Desktop.
Save anonymous/8560854 to your computer and use it in GitHub Desktop.
A Pen by Secret Sam.
<div class="animatedGradient">
</div>
<div class='description'>
<p>
Animated gradient - in this case used to create top bar for the page, could be used to show activity etc.
</p>
</div>
body {
background: #222;
margin:0px;
padding:0px;
color:white;
}
.description {
padding:100px;
font-size:120%;
}
.animatedGradient {
background: linear-gradient(to right, rgba(109,179,242,1) 0%,rgba(84,163,238,1) 43%,rgba(191,224,255,1) 61%,rgba(109,179,242,1) 84%);
width:100%;
height:10px;
background-size: auto 200%;
background-position: 0 100%;
animation: gradient 3s infinite;
animation-fill-mode:forwards;
animation-timing-function: linear;
}
@keyframes gradient {
0% {
background-position: 0 0;
}
100% {
background-position: -200% 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment