Last active
November 7, 2020 02:14
-
-
Save sarahquigley/59f3587d057bc6055178247d1b6a3c94 to your computer and use it in GitHub Desktop.
CSS Lab: Shiny Gradient Hover Effect 3
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
/* Where the magic begins: */ | |
.shiny { | |
background-image: -webkit-linear-gradient(left, white 25%, #fde071 37.5%, #ef9671, #996a6e 62.5%, white 75%); | |
background-image: linear-gradient(90deg, white 25%, #fde071 37.5%, #ef9671, #996a6e 62.5%, white 75%); | |
background-position: right center; | |
background-size: 400% auto; | |
-webkit-background-clip: text; | |
background-clip: text; | |
color: white; | |
-webkit-text-fill-color: transparent; | |
text-fill-color: transparent; | |
transition: color 200ms linear; | |
} | |
.shiny:hover { | |
background-position: left center; | |
color: #ef9671; | |
transition: background-position 2000ms ease-out; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment