CSS 애니메이션 02

CSS3(keyframes, transform, translate, animation)을 이용한 Dot Animation Effect.

css dot animation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* css */
body {
height: 100vh;
margin: 0;
padding: 0;
background-image: linear-gradient(to top, #a18cd1 0%, #fbc2eb 100%);
}

.loading {
width: 20px;
height: 100px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
animation: loading ease-in-out 2s 100;
}

.loading .circle1 {
border-radius: 50%;
background: #fff;
width: 20px;
height: 20px;
}

.loading .circle2 {
border-radius: 50%;
background: #fff;
width: 20px;
height: 20px;
margin-top: 60px;
}

@keyframes loading {
0% {transform: rotate(0deg);}
100% {transform: rotate(360deg);}
}
1
2
3
4
5
<!-- HTML -->
<div class="loading">
<div class="circle1"></div>
<div class="circle2"></div>
</div>

REFERENCE
https://www.youtube.com/watch?v=mIW-htccaoo

  • © 2020-2025 404 Not Found
  • Powered by Hexo Theme Ayer