-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
64 lines (54 loc) · 1.37 KB
/
index.html
File metadata and controls
64 lines (54 loc) · 1.37 KB
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="description" content="Breaks free the old habbits.">
<title>Synthetic Vscode-style Scrollbar</title>
<link rel="stylesheet" href="scroller.css">
<style>
html,
body {
height: 100%;
padding: 0;
margin: 0;
overflow: hidden;
}
aside, main {
position: absolute;
top: 0;
bottom: 0;
}
aside {
right: 0;
width: 20%;
background-color: #f3f3f3;
}
main {
left: 0;
width: 80%;
}
#content {
background: linear-gradient(90deg, #fff 20px, transparent 1%) center, linear-gradient(#fff 20px, transparent 1%) center, silver;
background-size: 22px 22px;
width: 2000px;
height: 2000px;
}
</style>
</head>
<body>
<main class="container">
<div id="content"></div>
</main>
<aside></aside>
<script type="text/javascript" src="src/Scroller.js"></script>
<script type="text/javascript" src="src/Scrollbar.js"></script>
<script type="text/javascript">
const scroller = new Scroller(document.querySelector('.container'))
window.onresize = () => {
scroller.resize()
}
</script>
</body>
</html>