-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
72 lines (53 loc) · 1.47 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<title>Mobiscroll</title>
</head>
<body>
<input type="text" id="sc-input"/>
<div class="ui-touchScroll" id="sc">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
<li>11</li>
<li>12</li>
<li>13</li>
<li>14</li>
<li>15</li>
<li>16</li>
<li>17</li>
<li>18</li>
<li>19</li>
<li>20</li>
<li>21</li>
</ul>
</div>
<style type="text/css">
.ui-touchScroll{
margin:0;padding:0;
position:relative;
width:500px;height:500px; overflow:hidden;
background:#f1f1f1;
}
.ui-touchScroll:after{
display:block;content: '';
position:absolute;top:50%;left:0;right:0;
height:100px;margin-top:-50px;
border:1px solid red;
}
.ui-touchScroll ul{padding:0;margin:0;}
.ui-touchScroll li{padding:0;margin:0;height:100px;line-height:100px;font-size:22px;font-weight:bold;text-align:center;}
</style>
<script type="text/javascript" src="TouchScroll.js"></script>
</body>
</html>