Skip to content

Instantly share code, notes, and snippets.

@RobinMalfait
Created August 5, 2014 10:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobinMalfait/11b89fa9be18030f929e to your computer and use it in GitHub Desktop.
Save RobinMalfait/11b89fa9be18030f929e to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.0.rc.1)
// ----
/*=================================
= Preloader =
=================================*/
$size : 150px;
.preloader_ {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
background-color: #f5f5f5;
z-index: 9999;
.loading {
position: absolute;
top: 50%;
left: 50%;
margin-left: -($size / 2);
margin-top: -($size / 2);
text-align: center;
font-size: 18px;
font-family: Lato;
color: #333;
width: $size;
vertical-align: center;
span {
display: block;
margin: 0 auto;
}
span[class*="l-"] {
display: inline-block;
background: #000;
width: 4px;
height: 4px;
border-radius: 100%;
margin: 12px 2px;
position: relative;
animation: loading-item 4s infinite;
animation-timing-function: cubic-bezier(0.030, 0.615, 0.995, 0.415);
animation-fill-mode: both;
}
span.l-1 {
animation-delay: 1s;
}
span.l-2 {
animation-delay: 0.8s;
}
span.l-3 {
animation-delay: 0.6s;
}
span.l-4 {
animation-delay: 0.4s;
}
span.l-5 {
animation-delay: 0.2s;
}
span.l-6 {
animation-delay: 0s;
}
}
}
@keyframes loading-item {
0% {
transform: translateX(-30px);
opacity: 0;
}
25% {
opacity: 1;
}
50% {
transform: translateX(30px);
opacity: 0;
}
100% {
opacity: 0;
}
}
/*=================================
= Preloader =
=================================*/
.preloader_ {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
background-color: #f5f5f5;
z-index: 9999;
}
.preloader_ .loading {
position: absolute;
top: 50%;
left: 50%;
margin-left: -75px;
margin-top: -75px;
text-align: center;
font-size: 18px;
font-family: Lato;
color: #333;
width: 150px;
vertical-align: center;
}
.preloader_ .loading span {
display: block;
margin: 0 auto;
}
.preloader_ .loading span[class*="l-"] {
display: inline-block;
background: #000;
width: 4px;
height: 4px;
border-radius: 100%;
margin: 12px 2px;
position: relative;
animation: loading-item 4s infinite;
animation-timing-function: cubic-bezier(0.03, 0.615, 0.995, 0.415);
animation-fill-mode: both;
}
.preloader_ .loading span.l-1 {
animation-delay: 1s;
}
.preloader_ .loading span.l-2 {
animation-delay: 0.8s;
}
.preloader_ .loading span.l-3 {
animation-delay: 0.6s;
}
.preloader_ .loading span.l-4 {
animation-delay: 0.4s;
}
.preloader_ .loading span.l-5 {
animation-delay: 0.2s;
}
.preloader_ .loading span.l-6 {
animation-delay: 0s;
}
@keyframes loading-item {
0% {
transform: translateX(-30px);
opacity: 0;
}
25% {
opacity: 1;
}
50% {
transform: translateX(30px);
opacity: 0;
}
100% {
opacity: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment