-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmoonOrbit.html
More file actions
70 lines (62 loc) · 1.6 KB
/
moonOrbit.html
File metadata and controls
70 lines (62 loc) · 1.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Moon Orbit Animation</title>
<style>
body {
margin: 0;
background-color: #000;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
/* overflow: hidden; */
}
.orbit {
position: relative;
width: 300px;
height: 300px;
border-radius: 50%;
animation: turn 10s linear infinite;
}
.dharti {
position: absolute;
background-color: #3a8ef6;
border-radius: 50%;
left: 50%;
top: 50%;
height: 100px;
width: 100px;
transform: translate(-50%, -50%);
box-shadow: 0 0 30px rgba(58, 142, 246, 0.6);
}
.chandra {
position: absolute;
background-color: #fff;
border-radius: 50%;
left: 50%;
top: 50%;
height: 25px;
width: 25px;
transform: translate(170px, -50%);
box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}
@keyframes turn {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div class="orbit">
<div class="dharti"></div>
<div class="chandra"></div>
</div>
</body>
</html>