پیشنمایش زنده
کد HTML
<div class="loader">
<svg
xmlns="http://www.w3.org/2000/svg"
height="24px"
viewBox="0 -960 960 960"
width="24px"
fill="#fff"
>
<path
d="M400-120q-66 0-113-47t-47-113q0-66 47-113t113-47q23 0 42.5 5.5T480-418v-422h240v160H560v400q0 66-47 113t-113 47Z"
></path>
</svg>
<div class="in-load"></div>
</div>
کد CSS
.loader {
height: 80px;
width: 80px;
background-color: #0c0c0c;
border-radius: 50px;
display: grid;
place-content: center;
position: relative;
}
.loader svg,
.in-load {
animation: spin 3s linear infinite;
}
.in-load {
position: absolute;
height: 100%;
width: 100%;
background-color: transparent;
box-shadow:
inset 0 0 0 5px #0c0c0c,
inset 0 0 0 7px #fb9ec6,
inset 0 0 0 10px #0c0c0c,
inset 0 0 0 12px #fff;
border-radius: 50%;
}
.loader::before,
.loader::after {
content: "";
position: absolute;
height: 100%;
width: 100%;
background-image: conic-gradient(#f93827, #f0a04b, #fb9ec6);
border-radius: 50%;
z-index: -1;
padding: 3px;
right: -3px;
bottom: -3px;
animation: spin 5s linear infinite;
}
.loader::after {
filter: blur(10px);
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}