Skip to content

Commit 9dfa608

Browse files
authored
Merge pull request #906 from OAAK125/loading-animation
Loading animation
2 parents fc54613 + 0fc8795 commit 9dfa608

File tree

3 files changed

+136
-0
lines changed

3 files changed

+136
-0
lines changed

Loader diamond/index.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Figure Eight Loader</title>
7+
<link rel="stylesheet" href="style.css" />
8+
</head>
9+
<body>
10+
11+
<div class="loader">
12+
<div class="circle"></div>
13+
<div class="circle"></div>
14+
<div class="circle"></div>
15+
<div class="circle"></div>
16+
<div class="circle"></div>
17+
<div class="circle"></div>
18+
<div class="circle"></div>
19+
<div class="circle"></div>
20+
</div>
21+
22+
</body>
23+
</html>

Loader diamond/style.css

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/* ====== GLOBAL STYLES ====== */
2+
* {
3+
box-sizing: border-box;
4+
}
5+
6+
body {
7+
height: 100vh;
8+
margin: 0;
9+
display: flex;
10+
justify-content: center;
11+
align-items: center;
12+
background: radial-gradient(circle at center, #1a1a2e 0%, #0f0f1e 100%);
13+
font-family: 'Poppins', sans-serif;
14+
}
15+
16+
/* ====== LOADER CONTAINER ====== */
17+
.loader {
18+
display: flex;
19+
justify-content: center;
20+
align-items: center;
21+
position: relative;
22+
width: 200px;
23+
height: 100px;
24+
}
25+
26+
/* ====== CIRCLES ====== */
27+
.circle {
28+
position: absolute;
29+
border-radius: 50%;
30+
width: 16px;
31+
height: 16px;
32+
background: linear-gradient(135deg, #fcfbfe, #e43754);
33+
box-shadow: 0 0 10px #e43754;
34+
animation: figureEight 1.5s linear infinite;
35+
}
36+
37+
.circle:nth-child(2) {
38+
animation-delay: 0.1s;
39+
width: 13px;
40+
height: 13px;
41+
opacity: 0.8;
42+
}
43+
44+
.circle:nth-child(3) {
45+
animation-delay: 0.2s;
46+
width: 11px;
47+
height: 11px;
48+
opacity: 0.6;
49+
}
50+
51+
.circle:nth-child(4) {
52+
animation-delay: 0.3s;
53+
width: 10px;
54+
height: 10px;
55+
opacity: 0.5;
56+
}
57+
58+
.circle:nth-child(5) {
59+
animation-delay: 0.4s;
60+
width: 10px;
61+
height: 10px;
62+
opacity: 0.4;
63+
}
64+
65+
.circle:nth-child(6) {
66+
animation-delay: 0.5s;
67+
width: 10px;
68+
height: 10px;
69+
opacity: 0.3;
70+
}
71+
72+
.circle:nth-child(7) {
73+
animation-delay: 0.6s;
74+
width: 10px;
75+
height: 10px;
76+
opacity: 0.25;
77+
}
78+
79+
.circle:nth-child(8) {
80+
animation-delay: 0.7s;
81+
width: 10px;
82+
height: 10px;
83+
opacity: 0.2;
84+
}
85+
86+
/* ====== ANIMATION ====== */
87+
@keyframes figureEight {
88+
0%, 100% {
89+
transform: translate(0, 0);
90+
}
91+
12.5% {
92+
transform: translate(50px, -25px);
93+
}
94+
25% {
95+
transform: translate(100px, 0);
96+
}
97+
37.5% {
98+
transform: translate(50px, 25px);
99+
}
100+
50% {
101+
transform: translate(0, 0);
102+
}
103+
62.5% {
104+
transform: translate(-50px, -25px);
105+
}
106+
75% {
107+
transform: translate(-100px, 0);
108+
}
109+
87.5% {
110+
transform: translate(-50px, 25px);
111+
}
112+
}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Please be aware that the demos may exhibit significant accessibility issues, suc
7676
- [Jumping Ball](#jumping-ball)
7777
- [Light Bulb Animation](#light-bulb-animation)
7878
- [Lighthouse Scene](#lighthouse-scene)
79+
- [Loader Diamond Animation](#loader-diamond)
7980
- [Loaders](#loaders)
8081
- [Loading_Css_effect](#Loading-Css-effect)
8182
- [Lego_Loader](#Lego-Loader)

0 commit comments

Comments
 (0)