-
Notifications
You must be signed in to change notification settings - Fork 0
/
flame-test.html
319 lines (309 loc) · 14.2 KB
/
flame-test.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
<!DOCTYPE html>
<html>
<head>
<title>Flame Test</title>
<link type="text/css" rel="stylesheet" href="/main.css">
<link rel="icon" type="image/x-icon" href="https://i.ibb.co/L6mkY4V/Photo-from-no-reply-1-removebg-preview.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='https://fonts.googleapis.com/css?family=Port+Lligat+Sans' rel='stylesheet'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style>
body {
margin: 0;
font-family: 'Port Lligat Sans', Arial, Helvetica, sans-serif;
background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),url(https://lh3.googleusercontent.com/SuoGEEbnTSozlrJq-_AK-jdV3YgTsgY55KJebLDwLxonKUEQ17yEVK2lXeSeMeZ_VPOkag=w16383);
background-size: cover; background-position: center center;
text-align:center;
overflow-x: hidden;
}
::selection {
background: lightgreen;
color: orangered;
}
html {
scroll-behavior: smooth;
}
.topnav {
overflow: hidden;
background-color: #000000;
text-align: left;
position:fixed;
width:100%;
}
.topnav a {
float: left;
color: #f2f2f2;
text-align: center;
padding: 12px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: #ddd;
color: black;
}
.topnav a.active {
background-color: #04AA6D;
color: white;
}
.time{
background-color: brown;
position: fixed;
bottom: 0; /* Position the navbar at the top of the page */
width: 100%; /* Full width */
overflow: hidden;
}
main {
margin-top: 30px; /* Add a top margin to avoid content overlay */
}
.question{
background-color:#ffffb3;
width: 75%;
margin: auto;
padding: 10px;
text-align: left;
}
.bottomBG{
background-color:#e6e6ff;
width:100%;
height:auto;
text-align: left;
}
.navbar {
background-color: #333;
overflow: hidden;
position: fixed;
bottom: 0;
width: 100%;
}
.responsiveImg{
height: auto;
max-width:100%;
}
.turnOnButton{
background-color: #04AA6D;
border: 1px solid green;
color: white;
padding: 13px 30px;
cursor: pointer;
width: 10%;
border-radius:3%;
}
.turnOnButton:hover {
background-color: #3e8e41;
}
.collapsible{
background-color: #eee;
color: #444;
cursor: pointer;
padding: 18px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 15px;
}
.active, .collapsible:hover {
background-color: #9966ff;
}
.content {
padding: 0 18px;
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
background-color: #47476b;
}
.flameOpacity{
transition: opacity 2s;
}
.setOpacity{
opacity:1;
}
a:hover{
text-decoration: underline orange;
}
#myBtn {
display: none; /* Hidden by default */
position: fixed; /* Fixed/sticky position */
bottom: 20px; /* Place the button at the bottom of the page */
right: 30px; /* Place the button 30px from the right */
z-index: 99; /* Make sure it does not overlap */
border: 2px solid blue; /* Remove borders */
outline: none; /* Remove outline */
background-color:lightskyblue;
color: white; /* Text color */
cursor: pointer; /* Add a mouse pointer on hover */
padding: 15px; /* Some padding */
border-radius: 35%; /* Rounded corners */
font-size: 18px; /* Increase font size */
}
#myBtn:hover {
background-color: #555; /* Add a dark-grey background on hover */
}
.fa {
padding: 10px;
font-size: 30px;
width: 30px;
text-align: center;
text-decoration: none;
border-radius: 50%;
}
.fa-google {
background: #dd4b39;
color: white;
}
.fa-instagram {
background: #125688;
color: white;
}
@media screen and (max-width: 1000px) {
.topnav a {
float: none;
display: block;
}
}
@media screen and (max-width: 1000px) {
.topnav a {
float: none;
display: block;
}
}
</style>
</head>
<body onresize="resized()" onscroll="scrollFunction()">
<!--INIT-->
<div class="topnav">
<a href="https://sites.google.com/syss.edu.hk/integrated-science-club/home"><img src="https://i.ibb.co/L6mkY4V/Photo-from-no-reply-1-removebg-preview.png" style="width:40px;height:40px;"/></a>
<code><h1 style="color:white"><strong>2022 - 2023 Integrated Science Club</strong></h1></code>
</div>
<button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
<!--END OF INIT-->
<div style="background-size: cover; background-position: center center; background-image: url(https://lh4.googleusercontent.com/S13xSz9_vgubyqIi6f7Aspb1t8lbHdR8-KJZpJIysAAOdS8eu9Mp54medojTgoIPzH6C0Q=w16383);padding-top:150px;">
<p id="addbr"></p>
<h1 style="color:#ff9999"><big><header><strong>Flame Test Simulation presented by Integrated Science Club and Chemistry Club</strong></header></big></h1>
<h3 style="color:#b3b3ff">Metal exists all around us. However, do you know that some specific metal burns in different color under heating?</h3>
<h3 style="color:#b3b3ff">We Integrated Science Club collaborated with <a href="https://sites.google.com/syss.edu.hk/chemistry-club" target="_blank" rel="noopener noreferrer">Chemistry Club</a> created this Flame Test Simulation for students to observe<br>common metals that produce special flame under heating.</h3>
<br><br>
</div>
<div style="background-color:#555;color:ghostwhite">
<details>
<summary><strong>Disclaimer</strong></summary>
<p style="padding-bottom:10px">The color presented here is <em>not</em> accurate. It is rather an approximation for everyone to understand and learn about reaction of metal under heating.</p>
</details>
</div>
<br><br>
<p id="mp"><img alt="Metal" src="https://i.ibb.co/Fmxk2Vp/aluminium.png" class="responsiveImg" style="width:80px;height:70px;" title="Metal"/></p>
<br><br>
<img alt="Bunsen Burner" src="https://i.ibb.co/dPXPCqV/bunsen-Burner-Flame.png" class="responsiveImg flameOpacity" title="Bunsen Burner" style="opacity:0;transition:opacity 2s;" id="flame" draggable="false"/><br>
<img alt="Bunsen Burner" src="https://i.ibb.co/5rvghrf/bunsen-Burner-No-Flame2.png" class="responsiveImg" title="Bunsen Burner" draggable="false"/>
<br><br>
<button class="turnOnButton" style="max-width:100%;width:auto;height: auto;text-align: center;" onclick="turnOn()" id="turnOnButtonD"><b id="turnOnText" style="margin-left:auto;margin-right:auto;text-align: center;">TURN ON</b></button>
<!--<button class="turnOnButton" disabled><b>TURN ON</b></button>-->
<br><br>
<select id="metal" onchange="changeImg()" style="background-color:#99ff99;border: 1px solid green;padding: 10px 24px;max-width:100%;width:auto;height: auto;color:rebeccapurple;border-radius:3%;" single>
<option value="aluminium"><b>Aluminium</b></option>
<option value="calcium"><b>Calcium</b></option>
<option value="iron"><b>Iron(II)</b></option>
<option value="mercury"><b>Mercury</b></option>
<option value="potassium"><b>Potassium</b></option>
<option value="lithium"><b>Lithium</b></option>
<option value="sodium"><b>Sodium</b></option>
<option value="zinc"><b>Zinc</b></option>
</select>
<br><br>
<div style="background-color:#bfbfbf">
<br>
<h2 style="text-align: center" id="faq">Common Questions: <a style="text-decoration: underline gray;color:gold" href="https://joshuasyss.github.io/is-club-mc.github.io/flame-test.html#faq">#</a></h2>
<br>
<button type="button" class="collapsible" style="text-align: center"><strong>Why does different metal produce different flame color on heat?</strong></button>
<div class="content" style="background-color: #1f1f2e;color:whitesmoke">
<br>
<strong>Different metals have different structure and electron arrangement. These are the main factors affecting the properties of the metal.<br>
The idea of the test is that sample atoms evaporate and since they are hot, they emit light when being in flame. </strong>
<br><br>
</div>
<button type="button" class="collapsible" style="text-align: center"><strong>Is it hard to do this experiment? If no, what should I pay attention to?</strong></button>
<div class="content" style="background-color: #1f1f2e;color:whitesmoke">
<br>
<strong>Not at all! You only need a pair of safety glasses, bunsen burner, fireproof mat, tongs and the sample metal.<br>
Please conduct the experiment under an adult supervisor. Also check the gas tube before igniting the bunsen burner.</strong>
<br><br>
</div>
<button type="button" class="collapsible" style="text-align: center"><strong>Among all common metals, why is Mercury the only metal that exist as liquid under room temperature?</strong></button>
<div class="content" style="background-color: #1f1f2e;color:whitesmoke">
<br>
<strong>In short, electrons of mercury (Hg) are too near the nucleus, and too fast or too unpredictable to move that they cannot be contained in a strong bond, i.e. solids.<br>
This concept of weak bonding makes a good explanation of mercury, being a liquid at room temperature. </strong>
<br><br>
</div>
<button type="button" class="collapsible" style="text-align: center"><strong>What is the product after heating?</strong></button>
<div class="content" style="background-color: #1f1f2e;color:whitesmoke">
<br>
<strong>The sample metal reacts with oxygen to form metal oxide through heating.</strong>
<br><br>
</div>
<button type="button" class="collapsible" style="text-align: center"><strong>Does all metal react with oxygen under heating?</strong></button>
<div class="content" style="background-color: #1f1f2e;color:whitesmoke">
<br>
<strong>Nope. Only metals that are relatively reactive, for example Potassium will produce Potassium Oxide after heating. Metals like gold will have no observable change.</strong>
<br><br>
</div>
<h1 style="text-align: center;margin-top:10px;">Wikipedia:</h1>
<embed type="text/html" style="border-radius: 5%;border: 2px solid #555;max-width: 80%;max-height: 80%;margin-left:auto;margin-right:auto;display:flex;" src="https://en.wikipedia.org/wiki/Flame_test" width="1000px" height="25%" alt="https://en.wikipedia.org/wiki/Flame_test">
<br><br>
</div>
<script>
var coll = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.maxHeight){
content.style.maxHeight = null;
} else {
content.style.maxHeight = content.scrollHeight + "px";
}
});
}
let mybutton = document.getElementById("myBtn");
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
<!--FOOTER-->
<div style="background-color: white">
<br><br>
<h2 style="color:#0066ff">Hope you learnt something new from this "experiment"! Chemistry is an interesting subject, so consider selecting it as one of your selective subject in the future!<br><br>
<code>Integrated Science Club Social Media:</code><br>
<a href="https://sites.google.com/syss.edu.hk/integrated-science-club/home" target="_blank" rel="noopener noreferrer" class="fa fa-google"></a>
<a href="https://www.instagram.com/syss_is_club/" target="_blank" rel="noopener noreferrer" class="fa fa-instagram"></a><br>
<code>Chemistry Club Social Media:</code><br>
<a href="https://sites.google.com/syss.edu.hk/chemistry-club" target="_blank" rel="noopener noreferrer" class="fa fa-google" style="background-color:hotpink"></a>
<!--https://sites.google.com/syss.edu.hk/chemistry-club-->
</h2>
<br><br>
</div>
<div class="bottomBG" style="border-top:3px solid rebeccapurple;padding:10px;">
<h5 style="color:black;">
<br>
Website created by <b>Integrated Science Club committee.</b><br>
Should you have any enquiries, feel free to contact any of our committee members, or sending an email to [email protected]<br>
<code>2022-23 Integrated Science Club</code>
</h5>
<code><a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="noopener noreferrer"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/80x15.png"/></a><br/>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="noopener noreferrer">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</code><br>
<a href="https://sites.google.com/syss.edu.hk/integrated-science-club/home" target="_blank" rel="noopener noreferrer" class="fa fa-google"></a>
<a href="https://www.instagram.com/syss_is_club/" target="_blank" rel="noopener noreferrer" class="fa fa-instagram"></a><br>
</div>
<!--END OF FOOTER-->
<script src="ftest.js"></script>
</body>
</html>