Skip to content

Instantly share code, notes, and snippets.

@deenoize
Created March 7, 2016 01:10
Show Gist options
  • Save deenoize/421b3ecdc81e030a7ffd to your computer and use it in GitHub Desktop.
Save deenoize/421b3ecdc81e030a7ffd to your computer and use it in GitHub Desktop.
css-shine-animation
.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