<h1>CSS LOADING SPINNERS</h1>
<div class="loaders-container">
<div class="container">
<div class="box"></div>
</div>
<div class="container">
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
<div class="line"></div>
</div>
<div class="container">
<div class="circle"></div>
</div>
<div class="container">
<div class="wavecontainer">
<div class="wave"></div>
<div class="wave"></div>
<div class="wave"></div>
<div class="wave"></div>
<div class="wave"></div>
</div>
</div>
<div class="container">
<div class="circleloader"></div>
</div>
<div class="container">
<div class="switchbox">
<div class="switch"></div>
<div class="switch"></div>
</div>
</div>
<div class="container">
<div class="bouncybox">
<div class="bouncy"></div>
</div>
</div>
</div>
body {
background: #16a085;
}
h1 {
text-align: center;
font-family: Arial;
color: #FFF;
font-size: 50px;
}
.loaders-container {
padding: 20px;
margin: 0 auto;
width: 700px;
text-align: center;
font-size: 0;
.container {
position: relative;
display: inline-block;
box-sizing: border-box;
padding: 30px;
width: 25%;
height: 140px;
}
}
.box {
position: relative;
box-sizing: border-box;
border: 4px solid #FFF;
width: 80px;
height: 80px;
animation: spin 3s infinite linear;
&:before {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
box-sizing: border-box;
border: 4px solid #FFF;
width: 60px;
height: 60px;
animation: pulse 1.5s infinite ease;
}
}
.line {
position: absolute;
top: 50%;
margin-left: 10px;
width: 60px;
height: 4px;
background: #FFF;
animation: spin 1.5s infinite ease;
&:nth-of-type(2) { animation-delay: 0.1s; }
&:nth-of-type(3) { animation-delay: 0.2s; }
&:nth-of-type(4) { animation-delay: 0.3s; }
}
.circle {
box-sizing: border-box;
width: 80px;
height: 80px;
border-radius: 100%;
border: 10px solid rgba(255, 255, 255, 0.2);
border-top-color: #FFF;
animation: spin 1s infinite linear;
}
.wave {
margin-top: 15px;
float: left;
width: 18px;
height: 40px;
box-sizing: border-box;
border: 2px solid #FFF;
margin-left: -2px;
animation: slide 0.6s infinite linear;
&:first-child {
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
&:last-child {
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}
&:nth-child(2n+1) {
animation-delay: 0.3s;
}
}
.circleloader {
position: absolute;
box-sizing: border-box;
top: 50%;
margin-top: -10px;
border-radius: 16px;
width: 80px;
height: 20px;
padding: 4px;
background: rgba(255, 255, 255, 0.4);
&:before {
content: '';
position: absolute;
border-radius: 16px;
width: 20px;
height: 12px;
left: 0;
background: #FFF;
animation: push 1s infinite linear;
}
}
.switchbox {
position: relative;
height: 80px;
animation: spin 2s infinite linear;
.switch {
position: absolute;
top: 50%;
margin-top: -10px;
width: 20px;
height: 20px;
background: #FFF;
border-radius: 20px;
animation: cross 2s infinite linear;
&:nth-of-type(2) {
animation-delay: -1s;
}
}
}
.bouncybox {
height: 100px;
width: 40px;
margin-left: 20px;
.bouncy {
width: 40px;
height: 40px;
border-radius: 20px;
background: #ecf0f1;
animation: bouncy 2s infinite ease-in-out;
}
}
@keyframes bouncy {
40% {
height: 40px;
}
50% {
transform: translate(0, 65px);
height: 34px;
border-radius: 20px;
}
65% {
height: 40px;
}
}
@keyframes push {
50% {
left: 56px;
}
}
@keyframes slide {
50% {
margin-top: 25px;
}
}
@keyframes pulse {
50% {
border-width: 30px;
}
}
@keyframes spin {
100% {
transform: rotate(360deg);
}
}
@keyframes cross {
50% {
margin-left: 60px;
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.