Skip to content

Commit cc8ffd8

Browse files
committed
✨ Add Code Simple Loader
1 parent 22165f5 commit cc8ffd8

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

Simple Loader/index.html

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

Simple Loader/style.css

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/* MAIN */
2+
3+
#preloader {
4+
position: absolute;
5+
top: 0;
6+
left: 0;
7+
width: 100%;
8+
height: 100vh;
9+
background-color: #d50000;
10+
}
11+
12+
#preloader>.loader {
13+
position: absolute;
14+
top: 50%;
15+
left: 50%;
16+
width: 146px;
17+
padding: 16px 40px;
18+
transform: translate(-50%, -50%);
19+
}
20+
21+
#preloader>.loader>.dot,
22+
#preloader>.loader>.dots>span {
23+
width: 24px;
24+
height: 24px;
25+
background-color: #fff;
26+
}
27+
28+
#preloader>.loader>.dot {
29+
position: absolute;
30+
animation: dot 1.2s infinite;
31+
transform: translateX(0);
32+
}
33+
34+
#preloader>.loader>.dots {
35+
animation: dots 1.2s infinite;
36+
transform: translateX(32px);
37+
}
38+
39+
#preloader>.loader>.dots>span {
40+
display: block;
41+
float: left;
42+
margin-left: 8px;
43+
margin-right: 8px;
44+
}
45+
46+
/* animation */
47+
@keyframes dot {
48+
50% {
49+
transform: translateX(120px);
50+
}
51+
}
52+
53+
@keyframes dots {
54+
50% {
55+
transform: translateX(-8px);
56+
}
57+
}
58+
59+
60+
/* JUST FOR PREVIEW */
61+
62+
body {
63+
margin: 0;
64+
padding: 0;
65+
width: 100%;
66+
height: 100vh;
67+
background-color: #d50000;
68+
}

0 commit comments

Comments
 (0)