ngx-smart-loader
Version:
Smart loader handler to manage loaders everywhere in Angular apps.
85 lines (77 loc) • 1.58 kB
CSS
/**
* This is a default style. If you want to use the default ngx-smart-loader loader,
* simply copy the HTML code in the documentation.
**/
.loader-container .loader {
display: block;
height: 80px;
width: 80px;
position: absolute;
left: 0;
right: 0;
margin: auto;
bottom: 0;
top: 0;
}
.loader-container .loader .circle {
display: block;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: #fff;
border-radius: 50%;
transition: all 180ms linear;
opacity: 0;
transform: translateY(0%);
}
.loader-container .loader .circle:after {
content: '';
display: block;
position: absolute;
width: 30px;
height: 30px;
border: 3px solid #5677fc;
border-radius: 50%;
border-left-color: transparent;
border-top-color: transparent;
left: 50%;
top: 50%;
transform: translate3d(-50%, -50%, 0);
animation: RotateIt 1s linear infinite;
}
.loader-container .loader .circle:before {
content: '';
display: block;
position: absolute;
width: 30px;
height: 30px;
border: 3px solid #efefef;
border-radius: 50%;
left: 50%;
top: 50%;
transform: translate3d(-50%, -50%, 0);
}
.loader-container.active .loader .circle {
opacity: 1;
animation: hop 500ms cubic-bezier(0.5, 1.25, 0.5, 1.25);
}
@keyframes hop {
0% {
transform: translateY(150%);
opcatiy: 0;
}
100% {
transform: translateY(0%);
opcatiy: 1;
}
}
@keyframes RotateIt {
0% {
transform: translate3d(-50%, -50%, 0) rotate(0deg);
}
100% {
transform: translate3d(-50%, -50%, 0) rotate(720deg);
}
}