hi currently i'm making a loader for my website when my website is still trying to get data from API.
.in-loader {
position: fixed;
z-index: 999;
height: 2em;
width: 2em;
overflow: visible;
margin: auto;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.in-loader:before {
content: '';
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: white;
}
}
div.in-loader {
position: fixed;
background: white;
width: 100%;
height: 100%;
z-index: 1000;
opacity: 0;
transition: opacity 0.5s ease;
overflow: hidden;
pointer-events: none;
display: flex;
align-items: center;
justify-content: center;
}
div.in-loader div {
width: 1rem;
height: 1rem;
margin: 2rem 0.3rem;
background: #fd6a4f;
border-radius: 50%;
-webkit-animation: 0.9s bounce infinite alternate;
animation: 0.9s bounce infinite alternate;
}
div.in-loader div:nth-child(2) {
-webkit-animation-delay: 0.3s;
animation-delay: 0.3s;
}
div.in-loader div:nth-child(3) {
-webkit-animation-delay: 0.6s;
animation-delay: 0.6s;
}
@-webkit-keyframes bounce {
to {
opacity: 0.3;
transform: translate3d(0, -1rem, 0);
}
}
@keyframes bounce {
to {
opacity: 0.3;
transform: translate3d(0, -1rem, 0);
}
}
<div class="in-loader">
<div></div>
<div></div>
<div></div>
</div>
when i run this code, it show the loader animation. but i think the div is verticaly stack. what i want is horizontaly stack. i tried `display:inline;', but it doesn't change anything. any answer would be appreciated. thank you