JSFiddle - React, Tailwind, and code Playground
by Yonas Hailu
HTML
<div class="loading-screen hide-me loading-white">
<ul class="loading-sprite">
<li class="circle-loading"></li>
<li class="pulse"></li>
<li class="pulse b"></li>
<li class="pulse c"></li>
</ul>
</div>
CSS
.loading-screen {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
/*background: #fff;*/
background: transparent;
visibility: visible;
opacity: 1;
transition: all .3s;
overflow: hidden;
}
.loading-screen.hide-me {
visibility: hidden;
opacity: 0;
}
.loading-screen.hide-me {
visibility: visible;
opacity: 1;
}
.loading-sprite {
box-sizing: content-box;
position: absolute;
top: 50%;
left: 50%;
padding: 2px;
margin: -22px 0 0 -22px;
width: 44px;
height: 44px;
list-style: none;
overflow: hidden;
background: #fff;
background: transparent;
z-index: 1;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.circle-loading {
position: relative;
top: 2px;
left: 2px;
width: 40px;
height: 40px;
z-index: 2;
opacity: 1;
border-radius: 100%;
background: #5f413f;
background: #fff;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.pulse.b {
content: '';
position: absolute;
top: 6px;
left: 6px;
right: 6px;
bottom: 6px;
border-radius: 100%;
background: #FF0229;
z-index: 4;
}
.pulse.b:before {
content: '';
position: absolute;
top: -2px;
left: -2px;
right: -2px;
bottom: -2px;
border-radius: 100%;
z-index: 5;
box-shadow: 0 0 0 20px #FF0229;
}
.pulse.c {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 2;
-webkit-animation: loadcircle 0.75s infinite linear;
animation: loadcircle 0.75s infinite linear;
}
.pulse.c:after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 60px;
height: 60px;
margin-top: -43.79562044px;
margin-left:...