CSS 전용 스피너 로더
HTML
<div class="mainLoaderContainer">
<span class="loaderSpan span1"></span>
<span class="loaderSpan span2"></span>
<span class="loaderSpan span3"></span>
<span class="loaderSpan span4"></span>
<span class="loaderSpan span5"></span>
<span class="loaderSpan span6"></span>
<span class="loaderSpan span7"></span>
<span class="loaderSpan span8"></span>
<span class="loaderSpan span9"></span>
</div>
CSS
body {
margin: 0;
}
.mainLoaderContainer {
background-color:#000;
height:100vh;
display:flex;
align-items:center;
justify-content:center;
}
.loaderSpan {
position:absolute;
border-radius:50%;
animation: rotate 1.4s ease-in-out infinite;
}
.span1 {
width:50px;
height:50px;
border:4px solid #d500f9;
border-bottom:4px solid transparent;
border-left:4px solid transparent;
animation-delay: 50ms;
}
.span2 {
width:60px;
height:60px;
border:4px solid #e91e63;
border-bottom:4px solid transparent;
border-left:4px solid transparent;
animation-delay: 100ms;
}
.span3 {
width:70px;
height:70px;
border:4px solid #26a69a;
border-bottom:4px solid transparent;
border-left:4px solid transparent;
animation-delay: 150ms;
}
.span4 {
width:80px;
height:80px;
border:4px solid #cddc39;
border-bottom:4px solid transparent;
border-left:4px solid transparent;
animation-delay: 200ms;
}
.span5 {
width:90px;
height:90px;
border:4px solid #7cb342;
border-bottom:4px solid transparent;
border-left:4px solid transparent;
animation-delay: 250ms;
}
.span6 {
width:100px;
height:100px;
border:4px solid #ffa726;
border-bottom:4px solid transparent;
border-left:4px solid transparent;
animation-delay: 300ms;
}
.span7 {
width:110px;
height:110px;
border:4px solid #ff8a65;
border-bottom:4px solid transparent;
border-left:4px solid transparent;
animation-delay: 350ms;
}
.span8 {
width:120px;
height:120px;
border:4px solid #ef5350;
border-bottom:4px solid transparent;
border-left:4px solid transparent;
animation-delay: 400ms;
}
.span9 {
width:130px;
height:130px;
border:4px solid #4a148c;
border-bottom:4px solid transparent;
border-left:4px solid transparent;
animation-delay: 450ms;
}
@keyframes rotate {
0% {
transform: rotate(-45deg);
}
90%, 100% {
transform: rotate(315deg);
}
}
그게 다야.
여기에서 작업 데모를 확인할 수 있습니다. Codepen .
Reference
이 문제에 관하여(CSS 전용 스피너 로더), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/raghavbhardwaj/css-only-spinner-loader-58k9텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)