반응형
.loading {
display: flex;
height: 100px;
width: 100px;
animation: spin 1s infinite linear;
position: relative;
}
.start-point {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #00dbde;
z-index: 1;
}
.doughnut {
width: 50%;
height: 100%;
box-sizing: border-box;
-webkit-mask:
linear-gradient(#fff 0 0) padding-box,
linear-gradient(#fff 0 0);
-webkit-mask-composite: destination-out;
mask-composite: exclude;
border: 20px solid transparent;
&.left {
border-radius: 50px 0 0 50px;
background: linear-gradient(to bottom,#00dbde 18%,#fc00ff 87%) border-box;
border-right: none;
}
&.right {
border-radius: 0 50px 50px 0;
background: linear-gradient(to top,#fc00ff 13%,transparent) border-box;
border-left: none;
}
}
@keyframes spin {
from {
transform:rotate(0deg);
}
to {
transform:rotate(360deg);
}
}
<div class="loading">
<div class="start-point"></div>
<div class="doughnut left"></div>
<div class="doughnut right"></div>
</div>
반응형
'css > e.g.' 카테고리의 다른 글
[css] Text Gradient with Gradient Rotate Animation 텍스트 그라디언트 효과 (0) | 2022.01.23 |
---|---|
[css] filter를 이용해 이미지를 white/black 실루엣 이미지로 변경 (0) | 2022.01.22 |
[PC] Gradient Doughnut 1 (0) | 2021.09.24 |
[PC/MO] Pie Chart (0) | 2021.09.24 |
[css-real] 웹접근성을 고려한 .blind(hidden) 처리 (0) | 2021.01.20 |
댓글