728x90
반응형
빙글빙글 돌아가는 원
빙글빙글 돌아가는 두개의 원 애니메이션을 만들어 보아요🪄
HTML
<div class="loading">
<span class="circle1"></span>
<span class="circle2"></span>
</div>
두개의 원을 만들고, 그위에 부모 박스를 만듭니다.
CSS
body {
height: 100vh;
background-image: linear-gradient(-60deg, #FF85B3 0% , #9900F0 100%)
}
.loading {
position: absolute;
left: 50%;
top: 50%;
width: 20px;
height: 150px;
animation: loading 0.9s ease 1000;
}
.loading .circle1 {
display: block;
width: 20px;
height: 20px;
border-radius: 50%;
background: #00FFC6;
}
.loading .circle2 {
display: block;
width: 20px;
height: 20px;
border-radius: 50%;
background: #00FFC6;
margin-top: 110px;
}
@keyframes loading {
0% {transform: translate(-50%, -50%) rotate(0deg)}
100% {transform: translate(-50%, -50%) rotate(360deg)}
}
결과
'CSS' 카테고리의 다른 글
SVG 알아보기 (5) | 2022.09.07 |
---|---|
정신없이 움직이는 원 애니메이션 (1) | 2022.09.02 |
통통튀는 네모 애니메이션 (3) | 2022.08.29 |
CSS 요소 숨기기 (6) | 2022.08.25 |
Illustrator - 사슴 그리기 (9) | 2022.08.24 |
댓글