Skip to content

Instantly share code, notes, and snippets.

@jimmy89Li
Last active September 7, 2016 07:55
Show Gist options
  • Save jimmy89Li/14f0b2727decb307b5489567d7c809e2 to your computer and use it in GitHub Desktop.
Save jimmy89Li/14f0b2727decb307b5489567d7c809e2 to your computer and use it in GitHub Desktop.
Loading placeholder
<div class="placeholder">
<div class="loader">
<div class="loader1"></div>
<div class="loader2"></div>
<div class="loader3"></div>
</div>
</div>
/* Placeholder */
.placeholder {
width: 100%;
height: 205px;
background: #2f2f2f;
margin-bottom: 10px;
}
.loader {
width: 63px;
position: relative;
margin: 0 auto;
padding: 94px;
}
.loader > div {
width: 18px;
height: 18px;
background-color: #fff;
border-radius: 100%;
display: inline-block;
-webkit-animation: loaderdelay 1.4s infinite ease-in-out both;
animation: loaderdelay 1.4s infinite ease-in-out both;
}
.loader .loader1 {
-webkit-animation-delay: -0.32s;
animation-delay: -0.32s;
}
.loader .loader2 {
-webkit-animation-delay: -0.16s;
animation-delay: -0.16s;
}
@-webkit-keyframes loaderdelay {
0%, 80%, 100% { -webkit-transform: scale(0) }
40% { -webkit-transform: scale(1.0) }
}
@keyframes loaderdelay {
0%, 80%, 100% {
-webkit-transform: scale(0);
transform: scale(0);
} 40% {
-webkit-transform: scale(1.0);
transform: scale(1.0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment