پیشنمایش زنده
کد HTML
<div class="loader">
<span></span>
</div>
کد CSS
.loader {
position: relative;
width: 160px;
height: 160px;
border: 4px solid #c20000;
overflow: hidden;
border-radius: 50%;
box-shadow:
-5px -5px 5px rgba(255, 255, 255, 0.1),
10px 10px 10px rgba(0, 0, 0, 0.4),
inset -5px -5px 5px rgba(255, 255, 255, 0.2),
inset 10px 10px 10px rgba(255, 111, 111, 0.4);
}
.loader:before {
content: "";
position: absolute;
top: 25px;
left: 25px;
right: 25px;
bottom: 25px;
z-index: 10;
background: #ffffff;
border-radius: 50%;
border: 2px solid #292929;
box-shadow:
inset -2px -2px 5px rgba(255, 255, 255, 0.2),
inset 3px 3px 5px rgba(255, 0, 0, 0.5);
}
.loader span {
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
background-image: linear-gradient(
-225deg,
#db0000 0%,
#ff0000 50%,
#ff9797 100%
);
filter: blur(20px);
z-index: -1;
animation: animate 0.5s linear infinite;
}
@keyframes animate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}