-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
48 lines (46 loc) · 1.69 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
44
45
46
47
48
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>百叶窗轮播</title>
<script src="https://cdn.bootcss.com/jquery/3.2.0/jquery.min.js"></script>
<link rel="stylesheet" href="./src/css/index.css">
</head>
<body style="padding: 0;margin: 0;width: 100vw;height: 100vh;">
<div id="blindSwiper">
<a class="blind-url" href=""></a>
<div class="blind-pic"></div>
<div id="blind-control">
<div class="blindpn" id="blindPrev"><span></span></div>
<div class="dots-box"></div>
<div class="blindpn" id="blindNext"><span></span></div>
</div>
</div>
<script src="./src/js/blind.js"></script>
<script>
window.onload = function() {
// 轮播的数据存放在一个多维数组内
// 如下所示数组的第一位是图片路径,第二位是图片的标题,第三位是图片的跳转链接
let blindArray = [
['./src/images/1.jpg', '小行星', 'javascript:;'],
['./src/images/2.jpg', '红枫叶', 'javascript:;'],
['./src/images/3.jpg', '璀璨星空', 'javascript:;'],
['./src/images/4.jpg', '回家', 'javascript:;'],
['./src/images/5.jpg', '动物喝水', 'javascript:;'],
['./src/images/6.jpg', '山清水秀', 'javascript:;']
];
let blindBox = new blind ({
arr: blindArray,
autoPlay: true,
animationTime: 5000,
bladeNum: 20,
callback: function(num) {
console.log(num);
}
});
}
</script>
</body>
</html>