Created
March 7, 2016 01:10
-
-
Save deenoize/421b3ecdc81e030a7ffd to your computer and use it in GitHub Desktop.
css-shine-animation
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
.shing { | |
position: relative; | |
} | |
.shing::after { | |
position: absolute; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
top: 0; | |
content: ''; | |
box-shadow: inset 0 2px #FFF; | |
background: -50px center no-repeat; | |
background-image: linear-gradient(125deg,rgba(255,255,255,0) 30%,#FFF 30%,#FFF 50%,rgba(255,255,255,0) 50%); | |
background-clip: padding-box; | |
opacity: .3; | |
transition: background-position 0.4s; | |
} | |
.shing:hover:after { | |
background-position: 100px center; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment