-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
81 lines (76 loc) · 2.15 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=320 initial-scale=1.0 maximum-scale=1.0 user-scalable=0" />
<title>Flickable</title>
<script src="flickable.js" type="text/javascript"></script>
<link rel="stylesheet" href="flickable.css" type="text/css" media="screen">
<style type="text/css" media="screen">
body {
width: 320px;
margin: 0;
padding: 0;
font-family: helvetica, arial, sans-serif;
}
.flickable li {
height: 180px;
border: 10px solid green;
text-align: center;
line-height: 180px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ie-box-sizing: border-box;
-o-box-sizing: border-box;
box-sizing: border-box;
}
.flickable li:nth-child(6n+2) {
border: 10px solid blue;
}
.flickable li:nth-child(6n+3) {
border: 10px solid red;
}
.flickable li:nth-child(6n+4) {
border: 10px solid yellow;
}
.flickable li:nth-child(6n+5) {
border: 10px solid teal;
}
.flickable li:nth-child(6n) {
border: 10px solid black;
}
</style>
</head>
<body>
<div class="flickable">
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
<li>Six</li>
</ul>
</div>
<div class="flickable">
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
</ul>
</div>
<script type="text/javascript">
Flickable('.flickable', {
width: 320,
enableMouseEvents: true,
callback: function(n) {
if (window.console) {
console.log(n);
}
}
});
</script>
<p><a href="https://github.com/BoostCommunications/Flickable">View code on Github</a></p>
</body>
</html>