-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
53 lines (45 loc) · 992 Bytes
/
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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Canvas Slider</title>
<style>
.slider {
display: block;
margin: 0 auto;
background-color: #333;
cursor: grab;
}
.slider.dragging {
cursor: grabbing;
}
div.slider {
position: relative;
overflow: hidden;
}
div.slider img {
position: absolute;
pointer-events: none
}
p {
text-align: center;
}
</style>
</head>
<body>
<canvas class="slider" width="640" height="400">
<img src="http://lorempixel.com/640/400"/>
<img src="http://lorempixel.com/g/600/400"/>
<img src="http://lorempixel.com/640/150"/>
<img src="http://lorempixel.com/500/400"/>
</canvas>
<p>Example Sliders</p>
<div class="slider" style="width: 400px; height: 500px">
<img src="http://lorempixel.com/400/500"/>
<img src="http://lorempixel.com/g/360/500"/>
<img src="http://lorempixel.com/150/150"/>
<img src="http://lorempixel.com/350/350"/>
</div>
<script src="dist/canvas-slider.js"></script>
</body>
</html>