forked from you-dont-need/You-Dont-Need-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
106 lines (97 loc) · 1.69 KB
/
style.css
File metadata and controls
106 lines (97 loc) · 1.69 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
* {
padding: 0;
margin: 0;
}
body {
width: 100%;
height: 100vh;
display: grid;
place-items: center;
background: #081621;
}
@property --pulse {
syntax: '<length>';
inherits: false;
initial-value: 80px;
}
@property --pulse2 {
syntax: '<length>';
inherits: false;
initial-value: 56px;
}
@property --r {
syntax: '<angle>';
inherits: false;
initial-value: 0deg;
}
img {
background: red;
width: 100px;
height: 100px;
}
.earth {
position: relative;
width: 600px;
aspect-ratio: 1;
border-radius: 50%;
background-image: url('https://i.postimg.cc/9QCCCVsQ/earth.png');
background-repeat: repeat-x;
background-size: cover;
animation: earth 40s linear infinite, pulse 2s linear infinite alternate-reverse;
box-shadow: 0 -1px 1px 1px white,
-1px 1px 1px 1px #64BEC8,
0 0 var(--pulse) -20px #64BEC8,
inset 0 0 76px -10px #64BEC8,
inset 0 0 var(--pulse2) -10px #64BEC8;
&:before,
&:after {
content: '';
position: absolute;
left: 70px;
height: 10px;
border-radius: 45%;
filter: blur(12px);
transform: rotate(var(--r));
animation: rotation 10s linear infinite;
}
&:before {
width: 14%;
box-shadow: inset 0 0 70px 90px #A47478,
0 0 140px 70px #A47478;
}
&:after {
width: 7%;
height: 10px;
box-shadow: inset 0 0 70px -50px white,
inset 0 0 70px 90px #E5BC77,
0 0 130px 50px #E5BC77;
}
}
@keyframes earth {
0% {
background-position: 0 0;
}
100% {
background-position: -199% 0;
}
}
@keyframes pulse {
0% {
--pulse: 8rem;
--pulse2: 5.6rem;
--r: 0deg;
}
100% {
--pulse: 10rem;
--pulse2: 3.6rem;
--r: 180deg;
}
}
@keyframes rotation {
from {
--r: 0deg;
}
to {
--r: 180deg;
}
}