-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsolar.css
161 lines (140 loc) · 3.15 KB
/
solar.css
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
html, body {
/* width: 100%;
height: 100%; */
background-color: #121215;
}
.solar-system {
position: relative;
width: 780px;
height: 780px;
margin: auto;
overflow: hidden;
}
/* Some positioning rules that are common for all objects */
.orbit {
border: 1px dashed #666;
}
#sun, .orbit, .orbit + div, .orbit + div > div {
position: absolute;
}
#sun, .orbit, .orbit + div {
top: 50%;
left: 50%;
}
.orbit + div > div {
top: 0;
left: 50%;
}
.orbit, .orbit + div div, #earth {
border-radius: 50%;
}
/* Individual objects rules. They are pretty much the same for
all objects and basically only vary in orbit size
and planet size. And colors :) */
#sun {
/* Positions the top-left corner of the image to be *
/* in the middle of the box */
height: 200px;
width: 200px;
background-color: #fae20a;
margin-top: -100px;
margin-left: -100px;
border-radius: 50%;
box-shadow: 0 0 84px orange;
}
#earth {
position: absolute;
top: 0;
left: 50%;
height: 50px;
width: 50px;
margin-left: -25px;
margin-top: -25px;
border-radius: 50%;
box-shadow: 0 0 34px #3a4385;
}
.earth-orbit, .earth-spin {
width: 500px;
height: 500px;
margin-left: -250px;
margin-top: -250px;
}
#moon {
margin-top: -6px;
margin-left: -6px;
height: 12px;
width: 12px;
border-radius: 50%;
background: white;
box-shadow: 0 0 14px #3a4385;
}
.moon-orbit, .moon-spin {
height: 90px;
width: 90px;
margin-top: -45px;
margin-left: -45px;
border-color: #447;
}
#venus {
margin-top: -20px;
margin-left: -20px;
height: 40px;
width: 40px;
background-color: #3498db;
box-shadow: 0 0 34px #3a4385;
}
.venus-orbit, .venus-spin {
margin-top: -185px;
margin-left: -185px;
width: 370px;
height: 370px;
}
#mercury {
margin-top: -13.5px;
margin-left: -13.5px;
height: 25px;
width: 25px;
background-color: #a65e22;
/* box-shadow: 0 0 34px #3a4385; */
}
.mercury-orbit, .mercury-spin {
width: 280px;
height: 280px;
margin-left: -140px;
margin-top: -140px;
}
#mars {
margin-top: -16px;
margin-left: -16px;
height: 32px;
width: 32px;
background-color: #863222;
box-shadow: 0 0 14px #a64232;
}
.mars-orbit, .mars-spin {
width: 700px;
height: 700px;
margin-left: -350px;
margin-top: -350px;
}
/* Spinning animations */
@keyframes spin-right {
100% {
transform: rotate(360deg);
}
}
.earth-spin {
animation: spin-right 36.5s linear infinite;
}
.moon-spin {
animation: spin-right 3s linear infinite;
}
.venus-spin {
animation: spin-right 22s linear infinite;
}
.mercury-spin {
animation: spin-right 8.8s linear infinite;
}
.mars-spin {
animation: spin-right 68.7s linear infinite;
}