-
Notifications
You must be signed in to change notification settings - Fork 8
/
demo.html
86 lines (79 loc) · 1.65 KB
/
demo.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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>minimal carousel - demo</title>
<style>
.carousel {
width: 50%;
margin: 50px auto;
}
.carousel ul {
margin: 0;
padding: 0;
list-style-type: none;
}
.carousel ul li {
display: none;
font-family: sans;
font-style: 2em;
text-align: center;
}
.button-set {
text-align: center;
}
</style>
</head>
<body>
<h1>minimal carousel - demo</h1>
<div class="carousel">
<ul>
<li>First impressive message!</li>
<li>Second message with all the magic.</li>
<li>Also, you can configure minimal carousel as you want.</li>
</ul>
</div>
<div class="button-set">
<button onclick="myCarousel.prev();">prev()</button>
<button onclick="myCarousel.stop();">stop()</button>
<button onclick="myCarousel.play();">play()</button>
<button onclick="myCarousel.next();">next()</button>
</div>
<hr/>
<h2>Usage</h2>
<h3>HTML</h3>
<pre>
<div class="carousel">
<ul>
<li>
First impressive message!
</li>
<li>
Second message with all the magic
</li>
<li>
Also, you can configure minimal carousel as you want.
</li>
</ul>
</div>
</pre>
<h3>CSS</h3>
<pre>
.carousel ul li {
display: none;
}
</pre>
<h3>Javascript</h3>
<pre>
new Carousel({
carousel: '.carousel',
delay: 2.5,
autoplay: true
})
</pre>
<script type="text/javascript" src="minimal-carousel.js"></script>
<script type="text/javascript">
var myCarousel = new Carousel();
</script>
</body>
</html>