#global {
width: 70px;
margin: auto;
margin-top: 100px;
position: relative;
cursor: pointer;
height: 60px;
}
.mask {
position: absolute;
border-radius: 2px;
overflow: hidden;
perspective: 1000;
backface-visibility: hidden;
}
.anim {
transform: rotate(90deg);
}
#top {
width: 53px;
height: 20px;
left: 40px;
transform: skew(15deg, 0);
z-index: 100;
top: -26px;
}
#middle-top {
width: 33px;
height: 20px;
left: 60px;
top: -10px;
transform: skew(15deg, -45deg);
}
#middle {
width: 33px;
height: 20px;
left: 60px;
top: 15px;
transform: skew(-15deg, 40deg);
}
#bottom {
width: 53px;
height: 20px;
left: 40px;
top: 30px;
transform: skew(-15deg, 0);
}
.plane {
background: #2a6fed;
width: 100%;
height: 100%;
position: absolute;
z-index: 100;
perspective: 1000;
backface-visibility: hidden;
animation-direction: alternate;
animation-duration: 4s;
animation-iteration-count: infinite;
}
#bottom .plane {
z-index: 2000;
animation-name: trans1;
}
#middle .plane {
transform: translate3d(0, 0, 0);
background: #2358be;
animation-name: trans2;
}
#middle-top .plane {
transform: translate3d(0, 0, 0);
background: #2358be;
animation-name: trans3;
}
#top .plane {
transform: translate3d(0, 0, 0);
z-index: 2000;
animation-name: trans4;
}
@keyframes trans1 {
0% {
transform: translate3d(-100%, 0, 0);
}
25% {
transform: translate3d(0%, 0, 0);
}
100% {
transform: translate3d(0%, 0, 0);
}
}
@keyframes trans2 {
0% {
transform: translate3d(100%, 0, 0);
}
25% {
transform: translate3d(100%, 0, 0);
}
50% {
transform: translate3d(0%, 0, 0);
}
100% {
transform: translate3d(0%, 0, 0);
}
}
@keyframes trans3 {
0% {
transform: translate3d(-100%, 0, 0);
}
50% {
transform: translate3d(-100%, 0, 0);
}
75% {
transform: translate3d(0%, 0, 0);
}
100% {
transform: translate3d(0%, 0, 0);
}
}
@keyframes trans4 {
0% {
transform: translate3d(100%, 0, 0);
}
75% {
transform: translate3d(100%, 0, 0);
}
100% {
transform: translate3d(0%, 0, 0);
}
}
#loading-texte {
color: white;
position: absolute;
top: 70px;
font-family: Arial;
text-align: center;
font-size: 12px;
}
<section id="global">
<div class="anim">
<div id="top" class="mask">
<div class="plane"></div>
</div>
<div id="middle-top" class="mask">
<div class="plane"></div>
</div>
<div id="middle" class="mask">
<div class="plane"></div>
</div>
<div id="bottom" class="mask">
<div class="plane"></div>
</div>
</div>
<p id="loading-texte"><i>LOADING...</i></p>
</section>