forked from warpcgd/vue-concise-slider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
71 lines (67 loc) · 1.93 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<title>slider</title>
<style>
body {
background: #eee none repeat scroll 0 0;
color: #000;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
font-size: 14px;
margin: 0;
padding: 0;
/* position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;*/
/*bug:当内容超过一屏时,滚动条需要默认显示*/
overflow-y: scroll;
width: 100%;
}
body div{
width: 100%;
}
.main {
display: -webkit-flex;
display: flex;
flex-flow: column nowrap;
justify-content: center;
align-items: center;
height: 100%;
text-align: center;
margin-bottom: 20px;
}
h3 {
font-size: 20px;
margin: 0;
margin-top: 25px;
}
</style>
</head>
<body>
<div class="main" ontouchstart="iosScrollBug()">
<h3>基本例子</h3>
<div id="sliderbasic"></div>
<h3>垂直滚动</h3>
<div id="slidervertical"></div>
<h3>不定宽度</h3>
<div id="slidervariableWidth"></div>
<h3>无缝循环滚动</h3>
<div id="sliderbasicloop"></div>
<h3>多层级滚动</h3>
<div id="slidermultipleSlide"></div>
</div>
</body>
<script src="https://cdn.bootcss.com/vue/2.1.3/vue.js"></script>
<script src="dist/build.js"></script>
<script>
// ios 如果父层不进行touch事件的绑定,会造成子层不触发touch事件,猜想可能是事件的传递问题
function iosScrollBug(){}
</script>
</html>