-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
43 lines (40 loc) · 1.12 KB
/
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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Zepto Carousel</title>
<script type="text/javascript" charset="utf-8" src="./node_modules/zepto/zepto.min.js"></script>
<script type="text/javascript" charset="utf-8" src="./lib/zepto-carousel.js"></script>
<style>
#my-carousel {
height: 200px;
width: 400px;
margin: 20px;
overflow: none;
position: relative;
}
#my-carousel li {
display: inline;
float: left;
left:0;
/* uses Zepto's animate function with opacity, so set to 0 for initial page load */
opacity: 0;
position: absolute;
top: 0;
}
</style>
</head>
<body>
<h1>Test</h1>
<ul id="my-carousel">
<li><img src="http://lorempixel.com/400/200/technics/2" /></li>
<li><img src="http://lorempixel.com/400/200/technics/5" /></li>
<li><img src="http://lorempixel.com/400/200/technics/9" /></li>
</ul>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#my-carousel').carousel();
});
</script>
</body>
</html>