پیشنمایش زنده
کد HTML
<div class="loader"></div>
کد CSS
.loader {
width: 100px;
height: 100px;
border-radius: 50%;
background: conic-gradient(#ff6ec7, #ffc371, #38ef7d, #6a5acd, #ff6ec7);
animation:
rotate 2s linear infinite,
pulse 2s ease-in-out infinite;
position: relative;
}
.loader::before {
content: "";
position: absolute;
top: 10px;
left: 10px;
right: 10px;
bottom: 10px;
background-color: #282c34;
border-radius: 50%;
}
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
@keyframes pulse {
0%,
100% {
box-shadow:
0 0 15px rgba(255, 255, 255, 0.3),
0 0 30px rgba(255, 255, 255, 0.1);
}
50% {
box-shadow:
0 0 25px rgba(255, 255, 255, 0.5),
0 0 50px rgba(255, 255, 255, 0.2);
}
}