I would like to create a loader for my webpage, but I am not sure how to keep the body hidden while the animated loader shows, than delete the loader, and show the body after it is done loading. Here is the CSS for the loader body {
background-color:crimson;
height:100%;
width:100%;
}
.one, .two, .three {
height:25px;
width:25px;
background-color:white;
border-radius:100%;
float:left;
margin:5px;
}
.main {
padding-top:25%;
padding-left:47%;
}
.one {
animation-name:dot-one;
animation-duration:1s;
animation-iteration-count:infinite;
animation-delay:0.10s;
}
.two {
animation-name:dot-two;
animation-duration:1s;
animation-iteration-count:infinite;
animation-delay:0.20s;
}
.three {
animation-name:dot-three;
animation-duration:1s;
animation-iteration-count:infinite;
animation-delay:0.30s;
}
@keyframes dot-one {
0% {transform:scale(.5);}
50% {transform:scale(1);}
100% {transform:scale(.5);}
}
@keyframes dot-two {
0% {transform:scale(.5);}
50% {transform:scale(1);}
100% {transform:scale(.5);}
}
@keyframes dot-three {
0% {transform:scale(.5);}
50% {transform:scale(1);}
100% {transform:scale(.5);}
}