-
Notifications
You must be signed in to change notification settings - Fork 0
/
scroll.htm
56 lines (52 loc) · 1.58 KB
/
scroll.htm
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
<!DOCTYPE html>
<html>
<head>
<title>Scroll example</title>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="scroll.css" />
<script type="text/javascript" src="scroll.js"></script>
<style>
#myScroll {
width: 300px;
height: 150px;
border: solid 1px purple;
margin: 0 auto;
}
#myScroll .scroll-bar-handler {
background-color: purple;
}
</style>
</head>
<body>
<div class="scroll" id="myScroll">
<div class="scroll-main js-scroll-main">
<iframe class="scroll-resize js-scroll-resize-main" src="about:blank"></iframe>
<div class="scroll-content">
<iframe class="scroll-resize js-scroll-resize-content" src="about:blank"></iframe>
<div>
<p>Here goes the scrolled content</p>
<p>Here goes the scrolled content</p>
<p>Here goes the scrolled content</p>
<p>Here goes the scrolled content</p>
<p>Here goes the scrolled content</p>
<p>Here goes the scrolled content</p>
<p>Here goes the scrolled content</p>
<p>Here goes the scrolled content</p>
<p>Here goes the scrolled content</p>
<p>Here goes the scrolled content</p>
<p>Here goes the scrolled content</p>
<p>Here goes the scrolled content</p>
<p>Here goes the scrolled content</p>
<p>Here goes the scrolled content</p>
</div>
</div>
</div>
<div class="scroll-bar js-scroll-bar">
<div class="scroll-bar-handler js-scroll-bar-handler"></div>
</div>
</div>
<script type="text/javascript">
new Scroll(document.getElementById('myScroll'));
</script>
</body>
</html>