-
Notifications
You must be signed in to change notification settings - Fork 0
/
moon.html
105 lines (105 loc) · 1.82 KB
/
moon.html
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
<!DOCTYPE html>
<html>
<head>
<div class="planet">
<div class="satellite"></div>
</div>
</body>
</html>
<style>
body {
background: #101227;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
margin: 0;
font-size: 12px;
}
.planet {
width: 30em;
height: 30em;
background: white;
border-radius: 50%;
box-shadow:
0 0 5em #fed48c80,
0 0 20em 4em #e8a55233,
0 0 55em 8em #ff4d4d1a;
position: relative;
}
.satellite, .satellite::after {
content: "";
position: absolute;
width: 5em;
height: 5em;
border-radius: 50%;
}
.satellite{
background: #ffedd1;
box-shadow: -2em 0 5em -1em white;
overflow: hidden;
transition: 250ms;
left: 32em;
transform: rotate(20deg);
animation: round 5s infinite ease-in-out;
}
.satellite::after{
background: #262938;
width: 2.5em;
left: 2.5em;
box-shadow: 0 0 0.75em 0.95em #262938;
animation: shadow 5s infinite ease-in-out;
}
@keyframes shadow{
0% {
width: 2.5em;
left: 0;
}
25% {
width: 5em;
left: 0;
}
50% {
width: 2.5em;
left: 2.5em;
}
75% {
width: 0em;
left: 5em;
}
80% {
left: 0;
box-shadow: 0 0 0.55em 0.75em #262938;
}
100% {
width: 2.5em;
left: 0;
}
}
@keyframes round {
0%,
100%{
top: 2em;
left: -15em;
box-shadow: -2em 0 5em 0.5em #c6836466;
z-index: 2;
}
25% {
box-shadow: 0 0 3em 1em #412104b5;
}
70% {
box-shadow: 0 0 3em 1em black;
}
48% {
z-index: 2;
}
50%{
left: 40em;
top: 20em;
z-index: -1;
box-shadow: 2em 0 5em 0.5em #845a4682;
}
99%{
z-index: -1;
}
}