-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSolar System.html
73 lines (70 loc) · 1.33 KB
/
Solar System.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
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-color: black;
overflow: hidden;
}
.container {
font-size: 10px;
width: 40em;
height: 40em;
position: relative;
}
.sun {
position: absolute;
top: 15em;
left: 15em;
width: 10em;
height: 10em;
background-color: yellow;
border-radius: 50%;
box-shadow: 0 0 3em white;
}
.earth, {
position: absolute;
border-style: solid;
border-color: white transparent transparent transparent;
border-width: 0.1em 0.1em 0 0;
border-radius: 50%;
}
.earth {
top: 5em;
left: 5em;
width: 30em;
height: 30em;
animation: orbit 36.5s linear infinite;
}
.earth::before,
.moon::before {
content :'';
position :absolute;
}
.earth::before {
top : 2.8em;
left : 2.8em;
width : 3em;
height : 3em;
background-image :url('https://img2.pngdownload.id/20191106/ovt/transparent-earth-day-save-the-world-save-the-earth-5dc310d1aa6ec3.4567608915730649136981.jpg');
background-size :cover;
border-radius :50%;
}
@keyframes orbit {
to {transform :rotate(360deg); }
}
</style>
</head>
<body>
<div class="container">
<div class="sun"></div>
<div class="earth"></div>
</div>
</div>
</body>
</html>