-
Notifications
You must be signed in to change notification settings - Fork 146
/
tableview.html
161 lines (144 loc) · 3.29 KB
/
tableview.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
<!doctype html>
<html lang="en">
<head>
<title>Scrollability</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,maximum-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<style type="text/css">
html {
overflow: hidden;
background: #333;
font-family: Helvetica;
}
.scrollable {
-webkit-transform: translate3d(0,0,0);
}
#container {
position: absolute;
left: 0;
top: 24px;
bottom: 24px;
width: 320px;
background: #fff;
overflow: hidden;
}
.item {
position: relative;
top: -1px;
border-top: 1px solid #ccc;
padding: 9px 12px;
font: 21px Helvetica;
font-weight: bold;
background: #fff;
}
.item:last-child {
border-bottom: 1px solid #ccc;
}
.bar {
position: absolute;
background: #222;
left: 0;
width: 100%;
color: #fff;
padding: 5px 0;
font-size: 10px;
font-weight: bold;
text-align: center;
}
.bar.top {
top: 0;
border-bottom: 1px solid #000;
}
.bar.bottom {
bottom: 0;
}
/*.item.touched {
color: #fff;
background: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0, #028AF3),
color-stop(1, #005DE6)
);
}*/
</style>
<script type="text/javascript" src="/scrollability.min.js"></script>
<script language="javascript">
var names = [
"Arnulfo Heriberto Hao",
"Elbert Murray Heartsill",
"Danny Fred Querido",
"Boris Hobert Cregger",
"Clifton Brady Laurance",
"Homer Jay Telch",
"Lawrence Lloyd Barrus",
"Shannon Isaias Plate",
"Odis Raul Insley",
"Marion Ben Nhatsavang",
"Dong Brent Mcwilson",
"Chong Jarrod Hinderman",
"Eric Reyes Caffie",
"Junior Newton Dagan",
"Cleo Maynard Gutirrez",
"Cruz Rey Misiewicz",
"Jeremy Nelson Bew",
"Doug Buster Maclead",
"Zachariah Martin Colo",
"Nathaniel Houston Berneri",
"Clement Laverne Vrana",
"Kermit Jeffery Left",
"Davis Margarito Koran",
"Booker Wallace Primavera",
"Prince Enrique Pulice",
"Johnathon Minh Inciong",
"Stan Tony Calaycay",
"Owen Sang Tugade",
"Charlie Melvin Veloso",
"August Galen Kathel",
"Dominique Marc Sitterson",
"Mitchell Isaiah Chareunrath",
"Luther Avery Fekety",
"Myles Doug Strohl",
"Reuben Bob Holoman",
"Eloy Erwin Kendrick",
"Alec Bernard Hitz",
"Jessie Oswaldo Shamir",
"Jamison Seymour Nighman",
"Garret Chester Robasciotti",
"Clifford Samuel Sokoloff",
"Carlton Jamel Mcentee",
"Blair Titus Lennertz",
"Barton Edmund Payn",
"Ed Williams Faltin",
"Leonardo Kent Trimarchi",
"Lon Esteban Samrah",
"Mike Alfonzo Alaniz",
"George Gil Domnick",
"Lemuel Lesley Cerventez",
];
addEventListener('DOMContentLoaded', function() {
var container = document.getElementById('container');
var page = document.getElementById('page');
for (var i = 0; i < names.length*5; ++i) {
var item = document.createElement('div');
item.className = 'item';
item.innerHTML = names[i%names.length];
page.appendChild(item);
if (page.offsetHeight > container.offsetHeight*6) {
break;
}
}
});
</script>
</head>
<body>
<div class="bar top">Scrollability Demo</div>
<div class="bar bottom">Footer</div>
<div id="container">
<div id="page" class="scrollable vertical"></div>
</div>
</body>
</html>