sci-pro
Version:
70 lines (69 loc) • 1.35 kB
CSS
.sci-state-ball {
position: relative;
width: 150px;
height: 150px;
padding: 5px;
overflow: hidden;
color: var(--bg-color);
background-color: #fff;
border: 3px solid var(--color);
border-radius: 100%;
transform: scale(var(--size));
}
.sci-state-ball::before,
.sci-state-ball::after {
position: absolute;
bottom: 5px;
left: 50%;
z-index: 9;
width: 200px;
height: 200px;
margin-left: -100px;
content: '';
}
.sci-state-ball::before {
bottom: calc(var(--offset) * 1.54px);
background-color: #fff;
border-radius: 45%;
opacity: 0.4;
animation: rotate 6s linear infinite;
}
.sci-state-ball::after {
bottom: calc(var(--offset) * 1.54px + 10px);
background-color: #fff;
border-radius: 40%;
opacity: 0.3;
animation: rotate 8s linear infinite;
}
.sci-state-ball .sci-wave {
position: relative;
width: 100%;
height: 100%;
background: var(--color);
border-radius: 100%;
}
.sci-state-ball .sci-progress {
position: absolute;
inset: 0;
margin: auto;
}
.sci-state-ball .sci-progress::after {
position: absolute;
top: 0;
left: 0;
z-index: 99;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
font-size: 20px;
font-weight: bold;
color: #fff;
content: attr(data-num) '%';
}
@keyframes rotate {
to {
transform: rotate(1turn);
}
}