-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path3_planetselection.html
More file actions
112 lines (107 loc) · 3.16 KB
/
Copy path3_planetselection.html
File metadata and controls
112 lines (107 loc) · 3.16 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html lang="en">
<head>
<title>Planet Selection</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
<!--Refreshes index.html after 180 seconds-->
<meta http-equiv="refresh" content="180;url=index.html">
<!--Creates 3s fade-in animation-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Planet Selection</title>
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-image: url(starrynight.gif);
color: white;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
.text-box {
width: 80%;
margin-bottom: 20px;
text-align: center;
}
.image-container {
display: flex;
justify-content: space-evenly;
width: 80%;
}
.image-box {
position: relative;
width: 30%;
height: 300px;
}
.image-box img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 8px;
}
.image-box button {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: transparent;
color: transparent;
border: none;
font-size: 20px;
cursor: pointer;
transition: background-color 0.3s;
}
.image-box button:hover {
background-color: rgba(0, 0, 0, 0.7);
color: white;
}
#message-box {
margin-top: 50px;
font-size: 18px;
}
</style>
</head>
<body>
<!-- Text Box -->
<div class="text-box">
<h2>Select your Planet Type!</h2>
<p>Click on one of the planet types below.</p>
</div>
<!-- Image Container -->
<div class="image-container">
<!-- Rocky Planet -->
<div class="image-box">
<img src="rockyplaent.png" alt="Rocky Planet">
<a href="3.1_rockyplanet.html">
<button>Explore Image 1</button>
</a>
<div class="text-box"><center>Rocky Planet</center></div>
</div>
<!-- Gas Planet -->
<div class="image-box">
<img src="gasplanet.png" alt="Gas Planet">
<button onclick="showMessage('Incorrect. Please select another option!')">Explore Image 2</button>
<div class="text-box"><center>Gas Planet</center></div>
</div>
</div>
<!-- Message Box -->
<div id="message-box"></div>
<script>
function showMessage(message) {
const messageBox = document.getElementById('message-box');
messageBox.textContent = message;
messageBox.style.color = 'red'; // Set the font color to red
}
</script>
</body>
</html>