-
Notifications
You must be signed in to change notification settings - Fork 157
/
Copy pathindex.html
106 lines (103 loc) · 2.01 KB
/
index.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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>
ES6/ES2015 module isInViewport Example
</title>
<link rel="stylesheet" href="./common.css" />
<style>
.box {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
background-color: #C5C7BC;
height: 501px;
width: 100%;
margin-bottom: 2px;
text-align: center;
}
p {
padding: 0;
margin: 0;
line-height: 1.5em;
position: relative;
top: 50%;
transform: translateY(-50%);
}
.box.last {
color: #C5C7BC;
}
.tolerance {
height: 100px;
width: 100%;
background-color: rgb(212, 12, 20);
background-color: rgba(255, 0, 0, 0.4);
position: fixed;
top: 0;
left: 0;
z-index: 1;
}
.tolerance:before, .tolerance:after {
content:"";
display: table;
}
.tolerance:after {
clear: both;
}
.tolerance {
zoom: 1;
/* For IE 6/7 (trigger hasLayout) */
}
.tolerance * {
padding: 36px;
color: #fff;
}
</style>
<script src="./main.compiled.js">
</script>
</head>
<body>
<div class="tolerance">
<a class="right">Tolerance Area (Tolerance = 100px)</a>
</div>
<div id="container">
<div class="box">
<p>
1
</p>
</div>
<div class="box">
<p>
2
</p>
</div>
<div class="box">
<p>
3
</p>
</div>
<div class="box">
<p>
4
</p>
</div>
<div class="box">
<p>
5
</p>
</div>
<div class="box">
<p>
6
</p>
</div>
<div class="box last">
<p>
This div, if not in the tolerance area, will never turn light grey.
</p>
</div>
</div>
</body>
</html>