Skip to content

Instantly share code, notes, and snippets.

@adamlaki
Created December 26, 2018 07:56
Show Gist options
  • Save adamlaki/c27b08524a21cedcae8e7533594ae449 to your computer and use it in GitHub Desktop.
Save adamlaki/c27b08524a21cedcae8e7533594ae449 to your computer and use it in GitHub Desktop.
Animating Gradient Background with CSS
.button {
display: inline-block;
color: #fff;
padding: 20px 30px;
text-transform: uppercase;
font-weight: 700;
border-radius: 3px;
cursor: pointer;
background-image: linear-gradient(45deg, #ffc459, #ff6638);
background-size: auto 200%;
background-position: 0 100%;
transition: background-position 0.25s ease;
&:hover,
&:focus {
background-position: 0 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment