forked from you-dont-need/You-Dont-Need-JavaScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
71 lines (64 loc) · 1.93 KB
/
index.html
File metadata and controls
71 lines (64 loc) · 1.93 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>Animated 3D Earth</title>
<style>
body {
margin: 0;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #000;
overflow: hidden;
perspective: 1000px;
}
.scene {
width: 300px;
height: 300px;
position: relative;
}
.globe {
width: 100%;
height: 100%;
border-radius: 50%;
position: absolute;
transform-style: preserve-3d;
background: url('https://eoimages.gsfc.nasa.gov/images/imagerecords/57000/57735/land_ocean_ice_cloud_2048.jpg');
background-size: 200% 150%;
animation: spin 20s linear infinite;
box-shadow:
inset 30px 0 80px rgba(0, 0, 0, 0.8),
inset -30px 0 40px rgba(255, 255, 255, 0.2),
0 0 40px rgba(168, 219, 255, 0.4);
}
.globe::after {
content: "";
position: absolute;
inset: 0;
border-radius: 50%;
background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.3), rgba(0,0,0,0.7) 70%);
mix-blend-mode: overlay;
}
@keyframes spin {
0% { background-position: 0 0; }
100% { background-position: -200% 0; }
}
@keyframes dayNightCycle {
0% { background-position: 0 0; }
100% { background-position: 100% 100%; }
}
@keyframes shadowMovement {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
<div class="scene">
<div class="globe"></div>
</div>
</body>
</html>