Skip to content

Instantly share code, notes, and snippets.

@marcosrjjunior
Created February 18, 2020 23:39
Show Gist options
  • Save marcosrjjunior/7e1903aa10093ece79cdbe357bcea4a7 to your computer and use it in GitHub Desktop.
Save marcosrjjunior/7e1903aa10093ece79cdbe357bcea4a7 to your computer and use it in GitHub Desktop.
loading-overlay-with-spinner
<div className="loading-overlay">
<div className="bouncing-loader">
<div></div>
<div></div>
<div></div>
</div>
</div>
<style>
.loading-overlay {
position: absolute;
background: $white;
width: 100%;
height: 100%;
z-index: 1;
opacity: 0.5;
}
@keyframes bouncing-loader {
to {
opacity: 0.1;
transform: translate3d(0, -1rem, 0);
}
}
.bouncing-loader {
display: flex;
justify-content: center;
}
.bouncing-loader > div {
width: 1rem;
height: 1rem;
margin: 3rem 0.2rem;
background: #8385aa;
border-radius: 50%;
animation: bouncing-loader 0.6s infinite alternate;
}
.bouncing-loader > div:nth-child(2) {
animation-delay: 0.2s;
}
.bouncing-loader > div:nth-child(3) {
animation-delay: 0.4s;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment