پیشنمایش زنده
کد HTML
<div class="loader">
<span> </span>
</div>
کد CSS
/* Base */
.loader {
position: relative;
width: 150px;
height: 150px;
background: rgba(127, 86, 217, 0.15); /* Outer Circle base */
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.loader::before {
content: "";
position: absolute;
inset: 20px;
background: rgba(127, 86, 217, 0.18); /* Middle Circle base*/
border-radius: 50%;
}
.loader::after {
content: "";
position: absolute;
width: 50px;
height: 50px;
background: rgba(127, 86, 217, 0.2); /* Inner Circle base */
border-radius: 50%;
}
/* Spinner */
.loader span {
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: 100%;
background: transaprent;
transform-origin: top left;
animation: angularRotation 2s linear infinite;
box-shadow: 6px -95px 40px -30px #7f56d9;
border-top: 2px solid #7f56d9;
}
@keyframes angularRotation {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}