Created
December 26, 2018 07:56
-
-
Save adamlaki/c27b08524a21cedcae8e7533594ae449 to your computer and use it in GitHub Desktop.
Animating Gradient Background with CSS
This file contains hidden or 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
.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