lazy-load-list
Version:
lazy load list is a lightweight web package that loads items in lazy way to achieve high performance and better UX in large lists.
59 lines (57 loc) • 977 B
CSS
.hidden{
display: none;
}
/* List container style */
#container{
width: 100%;
height: 100%;
overflow-y: auto;
overflow-x: hidden;
scroll-behavior: smooth;
scrollbar-width: thin;
}
#end-of-list{
height: 32px;
width: 100%;
}
#loading-wrapper{
width: 100%;
height: 32px;
display: flex;
justify-content: center;
align-items: center;
}
/* Loading style */
.dots {
width: 3.5em;
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: space-between;
}
.dots div {
width: 0.8em;
height: 0.8em;
border-radius: 50%;
animation: fade 0.8s ease-in-out alternate infinite;
}
.dots div:nth-of-type(1) {
animation-delay: -0.4s;
}
.dots div:nth-of-type(2) {
animation-delay: -0.2s;
}
@keyframes fade {
from {
opacity: 1;
}
to {
opacity: 0;
}
}
@media(max-width: 480px) {
.dots div {
width: 0.7em;
height: 0.7em;
}
}