Skip to content

Instantly share code, notes, and snippets.

@Lyuji282
Created October 16, 2019 15:42
Show Gist options
  • Save Lyuji282/756ffb210813296c43cf7825ad132d5c to your computer and use it in GitHub Desktop.
Save Lyuji282/756ffb210813296c43cf7825ad132d5c to your computer and use it in GitHub Desktop.
.reflection {
margin: 0 auto;
position: relative;
overflow: hidden;
background-color: white;
}
.reflection::after {
content: "";
display: block;
width: 30px;
height: 100%;
position: absolute;
top: -180px;
left: 0;
background-color: #FFF;
opacity: 0;
transform: rotate(45deg);
animation: reflect 4s ease-in-out infinite;
animation-duration: 5s;
-webkit-transform: rotate(45deg);
-webkit-animation: reflect 4s ease-in-out infinite;
}
@keyframes reflect {
0% { transform: scale(0) rotate(45deg); opacity: 0; }
80% { transform: scale(0) rotate(45deg); opacity: 0.5; }
81% { transform: scale(4) rotate(45deg); opacity: 1; }
100% { transform: scale(50) rotate(45deg); opacity: 0; }
}
@-webkit-keyframes reflect {
0% { transform: scale(0) rotate(45deg); opacity: 0; }
80% { transform: scale(0) rotate(45deg); opacity: 0.5; }
81% { transform: scale(4) rotate(45deg); opacity: 1; }
100% { transform: scale(50) rotate(45deg); opacity: 0; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment