-
Notifications
You must be signed in to change notification settings - Fork 15
/
Earth.html
96 lines (87 loc) · 3.54 KB
/
Earth.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
.top {
display: flex;
flex-direction: column;
justify-content: flex-end;
}
h1 {
text-align: center;
color: white;
display: inline-block;
font: bold 2em Sans-Serif;
animation: fade-in 1s ease-in;
animation-fill-mode: both;
}
.earth {
animation: zoom-in 1s cubic-bezier(0.79, 0.01, 0.27, 1.55) 1s;
opacity: 0.0;
animation-fill-mode: both;
}
@keyframes zoom-in {
0% {
transform: perspective(1000px) translateZ(-99ch);
opacity: 0.0;
}
100% {
transform: perspective(1000px) translateZ(0);
opacity: 1;
}
}
@keyframes fade-in {
0% {
opacity: 0.0;
}
100% {
opacity: 1;
}
}
.slide-img {
display: absolute;
visibility: hidden;
}
</style>
<title>EARTH</title>
<meta name="Description" content="THIS IS EARTH">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script>
function onEarthImageLoaded(element) {
element.classList.add("earth");
}
window.addEventListener("DOMContentLoaded", (event) => {
let earthElement = document.getElementById("earth");
if (earthElement == undefined || earthElement == null) return;
if (earthElement.complete) {
onEarthImageLoaded(earthElement);
} else {
earthElement.addEventListener('load', () => {onEarthImageLoaded(element)});
}
setTimeout()
});
</script>
</head>
<body style="background-image: url(media/pexels-philippe-donn-1169754.jpg); background-size: cover; background-position: center center; margin: 0 auto; max-width: 100vw; height: 100vh;">
<div style=" display: flex; align-items: center; width: 100%; height: 100%;">
<div style="height: 100%; width: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; overflow: hidden;">
<div class="top" style="flex: 1 0 5%;">
<h1>THIS IS WHAT</h1>
</div>
<div style="width: 100%; min-height: 0; overflow: visible; max-height: 60%;">
<div style="display: flex; flex-direction: row; height: 100%;">
<div style="flex: 0 0 5%;"></div>
<div id="earth" class="earth" style="object-fit: contain; flex: 1 0; position: relative; text-align: center; display: block;">
<img src="media/Earth_Western_Hemisphere_transparent_background.png" alt="EARTH" style="max-height: 100%; max-width: 100%; object-fit: contain; transform: scaleY(0.05);">
</div>
<div style="flex: 0 0 5%;"></div>
</div>
</div>
<div style="flex: 1 0 5%">
<h1>THE EARTH LOOKS LIKE</h1>
</div>
</div>
</div>
</body>
</html>