-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
78 lines (71 loc) · 1.47 KB
/
style.css
File metadata and controls
78 lines (71 loc) · 1.47 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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
width: 100%;
height: 100vh;
background-image: url('image/bg2.jpg');
background-size: cover;
display: flex;
justify-content: center;
align-items: center;
}
.orbit {
width: 500px;
height: 500px;
border: 1px solid white;
border-radius: 50%;
position: relative;
animation: orbit-rotate 20s infinite linear;
}
.earth {
width: 100px;
height: 100px;
background-image: url('image/earth.png');
background-size: cover;
border-radius: 50%;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
box-shadow: inset 0px 0px 5px #FDFFF29E, inset 30px 0px 50px #000;
animation: earth-rotate 10s infinite linear;
}
.moon {
width: 50px;
height: 50px;
background-image: url('image/moon.jfif');
background-size: cover;
border-radius: 50%;
position: absolute;
top: 0;
left: 50%;
transform: translate(-50%, -50%);
animation: moon-orbit 5s infinite linear;
}
@keyframes earth-rotate {
0% {
transform: translate(-50%, -50%) rotate(0deg);
}
100% {
transform: translate(-50%, -50%) rotate(360deg);
}
}
@keyframes moon-orbit {
0% {
transform: rotate(0deg) translate(200px) rotate(0deg);
}
100% {
transform: rotate(360deg) translate(200px) rotate(-360deg);
}
}
@keyframes orbit-rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}