Skip to content

Commit 3e865ec

Browse files
committed
Added Loaders Part 02
1 parent 506a665 commit 3e865ec

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

Loaders/02/index.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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>Heart Loader</title>
7+
<link rel="stylesheet" href="styles.css">
8+
</head>
9+
<body>
10+
<div class="loader"></div>
11+
</body>
12+
</html>

Loaders/02/styles.css

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
box-sizing: border-box;
5+
}
6+
7+
body {
8+
height: 100vh;
9+
background-color: #090909;
10+
display: flex;
11+
justify-content: center;
12+
align-items: center;
13+
}
14+
15+
.loader {
16+
width: 80px;
17+
height: 80px;
18+
position: relative;
19+
animation: beat 1s infinite;
20+
}
21+
22+
.loader::before,
23+
.loader::after {
24+
content: "";
25+
position: absolute;
26+
top: 0;
27+
width: 50px;
28+
height: 80px;
29+
border-radius: 80px 80px 0 0;
30+
animation: color 1s infinite;
31+
}
32+
33+
.loader::before {
34+
left: 50px;
35+
transform: rotate(-45deg);
36+
transform-origin: 0 100%;
37+
}
38+
39+
.loader::after {
40+
left: 0;
41+
transform: rotate(45deg);
42+
transform-origin: 100% 100%;
43+
}
44+
45+
@keyframes beat {
46+
0%,
47+
100% {
48+
transform: scale(1);
49+
}
50+
51+
50% {
52+
transform: scale(1.2);
53+
}
54+
}
55+
56+
@keyframes color {
57+
0%,
58+
100% {
59+
background-color: #ffffff;
60+
}
61+
62+
50% {
63+
background-color: #f15b5b;
64+
}
65+
}

0 commit comments

Comments
 (0)