-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscrollx.html
39 lines (38 loc) · 1.1 KB
/
scrollx.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<link rel="stylesheet" href="css/master.css">
<script src="js/jquery/jquery-1.9.1.js"></script>
<script src="js/custom/jquery.scrollx.js"></script>
<style type="text/css">
.scrollx{ width:900px; margin:0 auto; overflow:hidden;}
.roll-inner{ width:99999px; overflow:hidden; zoom:1;}
.roll-list{ float:left; display:inline; overflow:hidden; zoom:1;}
.roll-list .roll-item{ float:left; display:inline; width:200px; height:200px; background:#ccc;}
</style>
</head>
<body>
<div class="scrollx">
<ul class="roll-list">
<li class="roll-item">1</li>
<li class="roll-item">2</li>
<li class="roll-item">3</li>
<li class="roll-item">4</li>
<li class="roll-item">5</li>
<li class="roll-item">6</li>
<li class="roll-item">7</li>
<li class="roll-item">8</li>
<li class="roll-item">9</li>
</ul>
</div>
<a href="javascript:;" id="prev">上一个</a>
<a href="javascript:;" id="next">下一个</a>
<script>
$('.scrollx').scrollx({
'everyWidth':200
});
</script>
</body>
</html>