Skip to content

Commit 7f213f6

Browse files
ryekramLaurelineP
andauthored
Contribute anim (#2901)
* Contributing my preloader animation. Contributing my preloader animation. * Fixed folder names and meta artName changed my folder name and meta.json property artName. --------- Co-authored-by: Laureline Paris <[email protected]>
1 parent 798daec commit 7f213f6

File tree

3 files changed

+84
-0
lines changed

3 files changed

+84
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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>Circle Preloader</title>
7+
<link rel="stylesheet" href="style.css">
8+
</head>
9+
<body>
10+
<div class="preloader">
11+
<div class="circle">
12+
<div class="circle-inner"></div>
13+
</div>
14+
</div>
15+
</body>
16+
</html>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"githubHandle": "ryekram",
3+
"artName": "preloader_animation"
4+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
box-sizing: border-box;
5+
}
6+
7+
.preloader {
8+
position: fixed;
9+
top: 0;
10+
left: 0;
11+
width: 100%;
12+
height: 100%;
13+
background-color: #f5f0f7;
14+
}
15+
16+
.circle {
17+
overflow: hidden;
18+
position: absolute;
19+
top: 50%;
20+
left: 50%;
21+
transform: translate(-50%, -50%) rotate(0deg);
22+
width: 100px;
23+
height: 100px;
24+
border: 1px solid #8e44ad;
25+
animation: rotate 4s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
26+
}
27+
28+
.circle-inner {
29+
position: absolute;
30+
bottom: 0;
31+
left: 0;
32+
background-color: #8e44ad;
33+
height: 100%;
34+
width: 100%;
35+
transition: all 500ms ease-in-out;
36+
animation: fill-in 4s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
37+
}
38+
39+
@keyframes rotate {
40+
0%, 10% {
41+
transform: translate(-50%, -50%) rotate(0deg);
42+
}
43+
45%, 55% {
44+
transform: translate(-50%, -50%) rotate(180deg);
45+
border-radius: 50%;
46+
}
47+
90%, 100% {
48+
transform: translate(-50%, -50%) rotate(360deg);
49+
border-radius: 0;
50+
}
51+
}
52+
53+
@keyframes fill-in {
54+
0%, 50% {
55+
height: 0;
56+
}
57+
50% {
58+
height: 100%;
59+
}
60+
90%, 100% {
61+
height: 0;
62+
}
63+
}
64+

0 commit comments

Comments
 (0)