-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path3dSlide.html
158 lines (154 loc) · 3.97 KB
/
3dSlide.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="slide3D.css" />
<style id="stylesheet">
html,body{
width: 100%;
height: 100%;
}
.slide3D img{
width: 100%;
}
.container3D{
background: #eee;
margin:10px;
float:left;
}
.title{
padding:10px;
color:#fff;
font-size:18px;
}
</style>
</head>
<body>
<div id="content">
<div class="title">轮番效果:slide、flip、turn、flat、fragment</div>
<div class="container3D slide">
<div class="wrapper3D">
<div class="slide3D">
<img src="image-slider-1.jpg" alt="" />
</div>
<div class="slide3D">
<img src="image-slider-2.jpg" alt="" />
</div>
<div class="slide3D">
<img src="image-slider-3.jpg" alt="" />
</div>
<div class="slide3D">
<img src="image-slider-4.jpg" alt="" />
</div>
<div class="slide3D">
<img src="image-slider-5.jpg" alt="" />
</div>
</div>
<div class="slide3D-pagination"></div>
<div class="slide3D-prev-button"></div>
<div class="slide3D-next-button"></div>
</div>
<div class="container3D flip">
<div class="wrapper3D">
</div>
<div class="slide3D-pagination"></div>
<div class="slide3D-prev-button"></div>
<div class="slide3D-next-button"></div>
</div>
<div class="container3D turn">
<div class="wrapper3D">
</div>
<div class="slide3D-pagination"></div>
<div class="slide3D-prev-button"></div>
<div class="slide3D-next-button"></div>
</div>
<div class="container3D flat">
<div class="wrapper3D">
</div>
<div class="slide3D-pagination"></div>
<div class="slide3D-prev-button"></div>
<div class="slide3D-next-button"></div>
</div>
<div class="container3D fragment">
<div class="wrapper3D">
</div>
<div class="slide3D-pagination"></div>
<div class="slide3D-prev-button"></div>
<div class="slide3D-next-button"></div>
</div>
</div>
<script src="slide3D.js"></script>
<script id="scripts">
var width = 400;
var height = 178;
var mySlide = new Slide3D('.slide', {
width: width,
height:height,
effect: 'slide',
pagination: true, // 是否添加分页器
loop:true //是否循环,除“slide”外,其他动画默认循环
});
var mySlide2 = new Slide3D('.flip', {
width: width,
height:height,
effect: 'flip', // flip | turn | slide | flat | fragment
sources: ['image-slider-1.jpg',
'image-slider-2.jpg',
'image-slider-3.jpg',
'image-slider-4.jpg',
'image-slider-5.jpg'],
box:{
rows: 6, // 切割行
cols: 3 // 切割列
},
pagination: true, // 是否添加分页器
});
var mySlide3 = new Slide3D('.turn', {
width: width,
height:height,
effect: 'turn', // flip | turn | slide | flat | fragment
sources: ['image-slider-1.jpg',
'image-slider-2.jpg',
'image-slider-3.jpg',
'image-slider-4.jpg',
'image-slider-5.jpg'],
box:{
rows: 6, // 切割行
cols: 3 // 切割列
},
pagination: true, // 是否添加分页器
});
var mySlide4 = new Slide3D('.flat', {
width: width,
height:height,
effect: 'flat', // flip | turn | slide | flat | fragment
sources: ['image-slider-1.jpg',
'image-slider-2.jpg',
'image-slider-3.jpg',
'image-slider-4.jpg',
'image-slider-5.jpg'],
box:{
rows: 6, // 切割行
cols: 10 // 切割列
},
pagination: true, // 是否添加分页器
});
var mySlide5 = new Slide3D('.fragment', {
width: width,
height:height,
effect: 'fragment', // flip | turn | slide | flat | fragment
sources: ['image-slider-1.jpg',
'image-slider-2.jpg',
'image-slider-3.jpg',
'image-slider-4.jpg',
'image-slider-5.jpg'],
box:{
rows: 6, // 切割行
cols: 3 // 切割列
},
pagination: true, // 是否添加分页器
});
</script>
</body>
</html>