Skip to content

Instantly share code, notes, and snippets.

@opejovic
Created April 24, 2020 22:19
Show Gist options
  • Save opejovic/29f7a423dd80cb65af21c5a9f0f4435e to your computer and use it in GitHub Desktop.
Save opejovic/29f7a423dd80cb65af21c5a9f0f4435e to your computer and use it in GitHub Desktop.
Shimmer / shine placeholder animation css.
.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