Created
May 11, 2018 21:32
-
-
Save robertg042/89757ac193575912c81ca4513055f042 to your computer and use it in GitHub Desktop.
css effects
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
.reveal { | |
position: relative; | |
} | |
.reveal::after { | |
position: absolute; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
top: 0; | |
content: ''; | |
background: 0 center no-repeat; | |
background-image: linear-gradient(90deg,rgba(36,101,178,0) 0%,rgba(36,101,178,1) 0%); | |
background-clip: border-box; | |
opacity: 0; | |
transition: none; | |
} | |
.reveal:hover:after { | |
opacity: 1; | |
background-position: 6rem center; | |
transition: background-position 1s ease-out; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment