-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBrooksPeriodicTable.html
146 lines (128 loc) · 3.53 KB
/
BrooksPeriodicTable.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
<!DOCTYPE html>
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-191749773-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-191749773-2');
</script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
overflow-y: scroll;
-ms-overflow-style:none;
scrollbar-width:none;
font-family: 'PT Sans', sans-serif;
}
body::-webkit-scrollbar{
display:none
}
#img-zoomed {
width: 650px;
height: auto;
position: absolute;
margin-top: -530px;
margin-left: 570px;
}
#img1 {
width: 550px;
height: auto;
margin-left: 50px;
box-shadow: 0 5px 10px -2px rgba(0,0,0,0.5);
}
#img-zoomed:hover, #img-zoomed:active {
cursor: zoom-in;
cursor: none;
}
#img-zoomed:hover #glass,
#img-zoomed:active #glass {
opacity: 1;
}
#glass {
width: 340px;
height: 340px;
background: url('images/periodicTable.jpg') no-repeat ;
pointer-events: none;
position: absolute;
opacity: 0;
border: 10px solid black;
z-index: 99;
border-radius: 100%;
display: block;
}
#textBlock{
width: 500px;
margin-left: 2%;
margin-top: 20px;
font-size:120%;
text-align:left;
background: #f6f5f3;
padding: 1em;
height:30em;
-webkit-box-orient:horizontal;
-webkit-box-direction:horizontal;
display:-webkit-box;
display:-ms-flexbox;
display:flex;
-ms-flex-direction:column;
flex-direction:column;
border-radius: 16px;
}
</style>
</head>
<body>
<div id="textBlock">
<h3 align="center"> Find the right elements in the periodic table using the
clues below. Hover over the table to magnify.
</h3>
<h3 align="center">
Combine the elements' symbols in the order listed below to find
the 9 letter password. _ _ _ _ _ _ _ _ _ </h3>
<ol>
<li> I am a solid, reactive-nonmetal. I weigh about twice the atomic weight of oxygen
and I sit above a famous poisonous metalloid. </li>
<li> I sit really close to Superman's worst enemy. I am gassy but
noble. I sit below a very luminous element. </li>
<li> Fourth column, look for 2-8-10-2. </li>
<li> Look for a famous tech valley in California. The element you are looking for is
a gas in that row that is often used in swimming pools. </li>
<li> I am named after a famous scientist. I am a solid,
radioactive actinide next to a metal with an unknown state. </li>
</ol>
</div>
<div id="img-zoomed">
<img id="img1" src="images/periodicTable.jpg">
<div id="glass"></div>
</div>
<script>
var zoomer = function (){
document.getElementById('img-zoomed')
.addEventListener('mousemove', function(e) {
var original = document.getElementById('img1'),
magnified = document.getElementById('glass'),
style = magnified.style,
x = e.pageX - this.offsetLeft,
y = e.pageY - this.offsetTop,
imgWidth = original.width,
imgHeight = original.height,
xZoomPos = ((x/imgWidth) * 100),
yZoomPos = ((y/imgHeight) * 100);
if(x > (.01 * imgWidth)) {
xZoomPos += (.15 * xZoomPos);
};
if(y >= (.01 * imgHeight)) {
yZoomPos += (.15 * yZoomPos);
};
style.backgroundPositionX = (xZoomPos - 9) + '%';
style.backgroundPositionY = (yZoomPos - 9) + '%';
style.left = (x - 180) + 'px';
style.top = (y - 180) + 'px';
},
false);
}();
</script>
</body>
</html>