<div class='preloader-container'>
<div class='preloader'>
<div class='preloader-dots'>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
</div>
<div class='description'>The dotwave</div>
</div>
<div class='preloader'>
<div class='preloader-squares'>
<div class='square'></div>
<div class='square'></div>
<div class='square'></div>
<div class='square'></div>
</div>
<div class='description'>The center-squares</div>
</div>
<div class='preloader'>
<div class='preloader-pulse'>
<div class='pulse-center'></div>
<div class='pulse-explosion'></div>
</div>
<div class='description'>The excited little dot</div>
</div>
<div class='preloader'>
<div class='preloader-chasing-squares'>
<div class='square'></div>
<div class='square'></div>
<div class='square'></div>
<div class='square'></div>
</div>
<div class='description'>The chasing squares</div>
</div>
<div class='preloader full-width'>
<div class='preloader-dotline'>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
</div>
<div class='description'>The dotline</div>
</div>
<div class='preloader full-width'>
<div class='preloader-pacman'>
<div class='pacman'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='dot'></div>
<div class='ghost'></div>
</div>
<div class='description'>The pacman ;-)</div>
</div>
<div class='footer'>More fun at <a href='http://www.selftaughtjs.com' target='_blank'>www.selftaughtjs.com</a></div>
</div>
body,
html,
.preloader-container {
height: 100%;
margin: 0;
background: #ccc;
color: #666;
font-family: open sans;
padding: 0;
}
a,a:active {
color:#000;
transition: color .2s ease;
}
a:hover {
color:tomato;
transition: color .2s ease;
}
/* Containers */
.footer {
}
.preloader.full-width {
width: 100%;
height: 120px;
margin-left: 0px;
margin-right: 0px;
}
.preloader {
background: #fff;
display: flex;
justify-content: center;
align-items: center;
height: 50%;
width: 45%;
margin: 5%;
border: 1px solid #ddd;
position: relative;
}
.description {
position: absolute;
bottom: 10px;
left: 12px;
}
.preloader-container {
cursor: default;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
/* Preloader #1 */
.preloader-dots {
height: 50px;
width: 80px;
}
.preloader-dots .dot {
display: inline-block;
background: #666;
height: 8px;
width: 8px;
opacity: 0.3;
border-radius: 50%;
animation: moveit 1.8s infinite;
}
.dot:nth-child(2) {
animation-delay: .15s;
}
.dot:nth-child(3) {
animation-delay: .3s;
}
.dot:nth-child(4) {
animation-delay: .45s;
}
.dot:nth-child(5) {
animation-delay: .6s;
}
@keyframes moveit {
0% {
transform: translateY(0px);
}
35% {
transform: translateY(0px);
opacity: 0.3;
}
50% {
transform: translateY(-20px);
opacity: 0.8;
}
70% {
transform: translateY(3px);
opacity: 0.8;
}
85% {
transform: translateY(-3px);
}
}
/* Preloader #2 */
.preloader-squares .square {
display: inline-block;
width: 15px;
height: 15px;
background: #666;
opacity: 0.2;
animation: movein 2s infinite;
}
.preloader-squares {
width: 50px;
line-height: 19px;
height: 50px;
}
.square {
opacity: 0.5;
}
.preloader-squares .square:nth-child(1) {
transform: translate(0, -25px)
}
.preloader-squares .square:nth-child(2) {
transform: translate(25px, 0)
}
.preloader-squares .square:nth-child(3) {
transform: translate(-25px, 0)
}
.preloader-squares .square:nth-child(4) {
transform: translate(0, 25px)
}
@keyframes movein {
33% {
transform: translate(0, 0);
opacity: 0.7;
}
66% {
transform: translate(0, 0);
opacity: 0.7;
}
}
/*Preloader #3*/
.pulse-center {
background: #666;
width: 15px;
height: 15px;
border-radius: 50%;
animation: pulse 1.5s infinite;
position: absolute;
opacity: 0.8;
z-index: 5;
}
.pulse-explosion {
content: '';
width: 15px;
height: 15px;
background: #ccc;
border-radius: 50%;
position: absolute;
animation: pulse-radius 1.5s infinite;
z-index: 1;
}
@keyframes pulse {
30% {
transform: scale(0.7);
opacity: 0.8;
}
50% {
transform: scale(1.1);
opacity: 1.0;
}
70% {
transform: scale(0.8);
opacity: 0.8;
}
}
@keyframes pulse-radius {
30% {
transform: scale(0.7);
opacity: 1;
}
40% {
transform: scale(7.8);
opacity: 0.1;
}
80% {
transform: scale(4.8);
opacity: 0;
}
100% {
transform: scale(1);
opacity: 0;
}
}
/*Preloader #4*/
.preloader-chasing-squares {
width: 50px;
height: 50px;
line-height: 19px;
}
.preloader-chasing-squares .square {
display: inline-block;
width: 15px;
height: 15px;
opacity: 1;
background: #666;
}
.preloader-chasing-squares .square {
animation: focusfade 2.8s infinite;
}
.preloader-chasing-squares .square:nth-child(1) {}
.preloader-chasing-squares .square:nth-child(2) {
animation-delay: .7s;
}
.preloader-chasing-squares .square:nth-child(3) {
animation-delay: 2.1s;
}
.preloader-chasing-squares .square:nth-child(4) {
animation-delay: 1.4s;
}
@keyframes focusfade {
0% {
opacity: 0.5;
background: #000;
}
30% {
opacity: 0.5;
background: #666;
}
60% {
opacity: 0;
}
75% {
opacity: 0;
}
100% {
opacity: 0.5;
background: #000;
}
}
/* preloader 5 */
.preloader-dotline .dot {
display: inline-block;
background: #666;
height: 5px;
width: 5px;
opacity: 0;
border-radius: 50%;
animation: dotline-move 4s infinite;
transform: translateX(-300px)
}
.preloader-dotline .dot:nth-child(1) {
animation-delay: .8s;
}
.preloader-dotline .dot:nth-child(2) {
animation-delay: .7s;
}
.preloader-dotline .dot:nth-child(3) {
animation-delay: .6s;
}
.preloader-dotline .dot:nth-child(4) {
animation-delay: .5s;
}
.preloader-dotline .dot:nth-child(5) {
animation-delay: .4s;
}
.preloader-dotline .dot:nth-child(6) {
animation-delay: .3s;
}
.preloader-dotline .dot:nth-child(7) {
animation-delay: .2s;
}
.preloader-dotline .dot:nth-child(8) {
animation-delay: .1s;
}
@keyframes dotline-move {
40% {
transform: translateX(0px);
opacity: 0.8;
}
100% {
transform: translateX(300px);
opacity: 0;
}
}
/* preloader pacman */
.preloader-pacman .dot {
display: inline-block;
background: #666;
height: 5px;
width: 5px;
margin-right: 20px;
opacity: 0.7;
border-radius: 50%;
animation: fade-out 14s linear infinite;
}
.preloader-pacman .pacman {
display: inline-block;
background: #666;
height: 20px;
vertical-align: bottom;
width: 20px;
margin-right: 20px;
opacity: 1;
border-radius: 50%;
position: relative;
animation: move-forward 14s linear infinite;
transform: translateX(-40px);
}
.preloader-pacman .dot:nth-child(1) {
animation-delay: .4s;
}
.preloader-pacman .dot:nth-child(2) {
animation-delay: .8s;
}
.preloader-pacman .dot:nth-child(3) {
animation-delay: 1.2s;
}
.preloader-pacman .dot:nth-child(4) {
animation-delay: 1.6s;
}
.preloader-pacman .dot:nth-child(5) {
animation-delay: 2.0s;
}
.preloader-pacman .dot:nth-child(6) {
animation-delay: 2.4s;
}
.preloader-pacman .dot:nth-child(7) {
animation-delay: 2.8s;
}
.preloader-pacman .dot:nth-child(8) {
animation-delay: 3.2s;
}
.preloader-pacman .dot:nth-child(9) {
animation-delay: 3.6s;
}
.preloader-pacman .dot:nth-child(10) {
animation-delay: 4.0s;
}
.preloader-pacman .dot:nth-child(11) {
animation-delay: 4.4s;
}
.preloader-pacman .dot:nth-child(12) {
animation-delay: 4.8s;
}
.preloader-pacman .dot:nth-child(13) {
animation-delay: 5.2s;
}
.preloader-pacman .dot:nth-child(14) {
animation-delay: 5.6s;
}
.preloader-pacman .dot:nth-child(15) {
animation-delay: 6.0s;
}
.preloader-pacman .dot:nth-child(16) {
animation-delay: 6.4s;
}
.preloader-pacman .dot:nth-child(17) {
animation-delay: 6.8s;
}
.preloader-pacman .pacman:before {
content: '';
display: inline-block;
background: transparent;
vertical-align: bottom;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
right: 0px;
border-right: 10px solid #fff;
opacity: 1;
position: absolute;
animation: eat .4s infinite;
}
.preloader-pacman .ghost {
height: 25px;
width:25px;
background:#669;
top:-22px;
border-top-left-radius:50%;
border-top-right-radius:50%;
position:relative;
transform: translateX(550px);
animation:move-back 14s linear infinite;
animation-delay:7s;
opacity:0;
}
.preloader-pacman .ghost:before {
height:5px;
content:'';
width:3px;
background:#fff;
top:7px;
left:7px;
z-index:10;
position:absolute;
}
.preloader-pacman .ghost:after {
height:5px;
content:'';
width:3px;
background:#fff;
top:7px;
right:7px;
z-index:10;
position:absolute;
}
@keyframes eat {
50% {
transform: translateX(10px) scale(0.1)
}
}
@keyframes move-back {
3% {opacity:1}
35% {opacity:1}
49% {opacity:0}
50% {transform: translateX(0px);}
}
@keyframes move-forward {
50% {
transform: translateX(500px);
}
50.1% {
transform: translateX(500px) scaleX(-1);
opacity: 1;
}
100% {
transform: translateX(-40px) scaleX(-1);
}
}
@keyframes fade-out {
0% {
opacity: 0;
}
40% {
opacity: 0;
}
89.99% {
opacity:0;
}
90% {
opacity: 0.5;
}
}
//////// /// /// // / /
//
// Read the step by step guide
// on www.selftaughtjs.com/creating-custom-preloaders/
//
//////// /// /// // / /
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.