-
Notifications
You must be signed in to change notification settings - Fork 0
/
多个窗口.html
93 lines (88 loc) · 1.57 KB
/
多个窗口.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
<!DOCTYPE html>
<html>
<head>
<title>多个窗口</title>
<style type="text/css">
*{margin:0;padding:0;}
.scrollBox{
position: relative;
overflow: hidden;
max-height:120px;
}
.svSlider{
width:4px;height:100%;
position: absolute;
right:2px;top:0;
z-index:10;
}
/* 滑块 */
.svSlider .svbar{
position: absolute;
width:4px;background:#dadada;
cursor:pointer;
}
.scrollBoxMain {
position: relative;
left:0;right:0;
}
.demo {
width:300px;
margin:20px auto;
}
.demo ul li{
width:100%;height:30px;
background:#f5f7fc;
line-height:30px;
}
</style>
</head>
<body>
<div class="demo scrollBox">
<!-- 滚动条样式 s -->
<div class="svSlider">
<div class="svbar"></div>
</div>
<!-- 滚动条样式 e -->
<div class="scrollBoxMain">
<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>
</ul>
</div>
</div>
<div class="demo scrollBox">
<!-- 滚动条样式 s -->
<div class="svSlider">
<div class="svbar"></div>
</div>
<!-- 滚动条样式 e -->
<div class="scrollBoxMain">
<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>
</ul>
</div>
</div>
<script type="text/javascript" src="js/scroll.js"></script>
<script type="text/javascript">
window.onload = function() {
var scrollBox = document.querySelectorAll('.scrollBox');
var bar = new Scrollbars(30);
}
</script>
</body>
</html>