Created
April 24, 2020 22:19
-
-
Save opejovic/29f7a423dd80cb65af21c5a9f0f4435e to your computer and use it in GitHub Desktop.
Shimmer / shine placeholder animation css.
This file contains hidden or 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
.shine { | |
background: #f6f7f8; | |
background-image: linear-gradient( | |
to right, | |
#f6f7f8 0%, | |
#edeef1 20%, | |
#f6f7f8 40%, | |
#f6f7f8 100% | |
); | |
background-repeat: no-repeat; | |
background-size: 300%; | |
display: inline-block; | |
position: relative; | |
-webkit-animation-duration: 1.2s; | |
-webkit-animation-fill-mode: forwards; | |
-webkit-animation-iteration-count: infinite; | |
-webkit-animation-name: placeholderShimmer; | |
-webkit-animation-timing-function: linear; | |
} | |
@-webkit-keyframes placeholderShimmer { | |
0% { | |
background-position: -468px 0; | |
} | |
100% { | |
background-position: 468px 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment