-
Notifications
You must be signed in to change notification settings - Fork 3
/
typeexperiment.html
112 lines (111 loc) · 4.23 KB
/
typeexperiment.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
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
html, body {
margin:0;
padding:0;
font-family: "Helvetica Neue";
}
.propContainer {
width:30em;
max-width:500px;
}
h1 {
text-align: center;
word-break:hyphenate;
}
.propColumn {
float:left;
margin: 0 1em;
max-width: 500px;
}
#columnWrap {
width:1100px;
}
.barFooter {
height:60px;
width:100%;
border-top: 2px solid black;
position:fixed;
bottom:0;
background-color:white;
}
input[type="range"] {
width:250px;
height:60px;
margin-left:30px;
display:block;
float:left;
}
span {
float:left;
display: block;
font-size:1.2em;
line-height:54px;
padding-left:5px;
font-weight:bold;
}
</style>
</head>
<body>
<div id="columnWrap">
<div id="leftColumn" class="propColumn">
<div class="propContainer">
<h1>Proposition 1</h1>
<p>here's a bunch of example textasdfhjsalkdjhfs djf djf sdsdlkljdfhklsjhdf skdfhlysdhfusybdfsbdf ysb dfuysbd fsbd fyusdbf wbf sbd fsubd fsuadybf sbdf f.</p>
</div>
<div class="propContainer">
<h1>Proposition 2</h1>
<p>here's a bunch of example textasdfhjsalkdjhfs djf djf sdsdlkljdfhklsjhdf skdfhlysdhfusybdfsbdf ysb dfuysbd fsbd fyusdbf wbf sbd fsubd fsuadybf sbdf f.</p>
</div>
<div class="propContainer">
<h1>Proposition 3</h1>
<p>here's a bunch of example textasdfhjsalkdjhfs djf djf sdsdlkljdfhklsjhdf skdfhlysdhfusybdfsbdf ysb dfuysbd fsbd fyusdbf wbf sbd fsubd fsuadybf sbdf f.</p>
</div>
</div>
<div id="rightColumn" class="propColumn">
<div class="propContainer">
<h1>Proposition 1</h1>
<p>here's a bunch of example textasdfhjsalkdjhfs djf djf sdsdlkljdfhklsjhdf skdfhlysdhfusybdfsbdf ysb dfuysbd fsbd fyusdbf wbf sbd fsubd fsuadybf sbdf f.</p>
</div>
<div class="propContainer">
<h1>Proposition 2</h1>
<p>here's a bunch of example textasdfhjsalkdjhfs djf djf sdsdlkljdfhklsjhdf skdfhlysdhfusybdfsbdf ysb dfuysbd fsbd fyusdbf wbf sbd fsubd fsuadybf sbdf f.</p>
</div>
<div class="propContainer">
<h1>Proposition 3</h1>
<p>here's a bunch of example textasdfhjsalkdjhfs djf djf sdsdlkljdfhklsjhdf skdfhlysdhfusybdfsbdf ysb dfuysbd fsbd fyusdbf wbf sbd fsubd fsuadybf sbdf f.</p>
</div>
</div>
</div>
<div class="barFooter">
<input type="range" min="1" max="400" value="100"/>
<span id="left"></span>
<input type="range" min="1" max="400" value="100"/>
<span id="right"></span>
</div>
<script type="text/javascript">
var inputs = document.getElementsByTagName("input");
console.log(inputs[0]);
// inputs[0].onChange = updateText(this.value);
inputs[0].onchange = function() { updateText("left");}
inputs[1].onchange = function() { updateText("right");}
function updateText(side) {
if (side === "left") {
val = inputs[0].value;
document.getElementById(side).innerText = "font-size: " + val + "%";
document.getElementById(side + "Column").style.fontSize = val + "%";
} else {
val = inputs[1].value;
document.getElementById(side).innerText = "font-size: " + val + "%";
document.getElementById(side + "Column").style.fontSize = val + "%";
}
console.log(val);
console.log(side);
}
</script>
</body>
</html>