728x90
애니메이션04
오늘은 아래와 같이 물결 모양의 애니메이션을 만들어 보았습니다.
Pug
div.circle-wrap
- for (var x = 1; x<=12; x++)
div.row
- for (var y = 1; y<=12; y++)
.circle
CSS
body {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
background-image: linear-gradient(45deg, #ee9ca7 0%, #ffdde1 100%);
}
.row {
display: flex;
}
.row .circle {
width: 10px;
height: 10px;
border-radius: 50%;
margin: 5px;
background: #fff;
transform-origin: top center;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: scale(1.1) rotate(0deg);
}
50% {
transform: scale(0.2) rotate(180deg);
}
100% {
transform: scale(1.1) rotate(360deg);
}
}
.row:nth-child(1) .circle {
animation-delay: 100ms;
}
.row:nth-child(2) .circle {
animation-delay: 200ms;
}
.row:nth-child(3) .circle {
animation-delay: 300ms;
}
.row:nth-child(4) .circle {
animation-delay: 400ms;
}
.row:nth-child(5) .circle {
animation-delay: 500ms;
}
.row:nth-child(6) .circle {
animation-delay: 600ms;
}
.row:nth-child(7) .circle {
animation-delay: 700ms;
}
.row:nth-child(8) .circle {
animation-delay: 800ms;
}
.row:nth-child(9) .circle {
animation-delay: 900ms;
}
.row:nth-child(10) .circle {
animation-delay: 1000ms;
}
.row:nth-child(11) .circle {
animation-delay: 1100ms;
}
.row:nth-child(12) .circle {
animation-delay: 1200ms;
}
728x90
반응형
'CSS' 카테고리의 다른 글
[CSS]애니메이션05 (2) | 2022.09.21 |
---|---|
[CSS]MouseHoverEffect01 (3) | 2022.09.20 |
[CSS]CSS intro (5) | 2022.09.07 |
[CSS]SVG intro (4) | 2022.09.07 |
[CSS]CSS animation (4) | 2022.09.07 |
댓글