-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.html
81 lines (70 loc) · 1.66 KB
/
test.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
/*滑块*/
#slider {
width: 300px;
height: 36px;
position: relative;
text-align: center;
user-select: none;
-moz-user-select: none;
-webkit-user-select: none;
border-radius: 18px;
background-color: #666;
}
#slider_bg {
position: absolute;
left: 0;
top: 0;
background-color: #dbf2ed;
z-index: 1;
}
#label {
width: 50px;
position: absolute;
left: 0;
top: 0;
z-index: 3;
cursor: pointer;
height: 36px;
width: 50px;
border-radius: 18px;
background-color: #4db4f2;
}
#labelTip {
position: absolute;
left: 0;
width: 100%;
font-size: 14px;
color: #fff;
line-height: 36px;
text-align: center;
z-index: 2;
}
</style>
<script src="./jquery.js"></script>
<script src='./jquery.slideunlock.js'></script>
</head>
<body>
<div id="slider">
<div id="slider_bg"></div>
<span id="label" class='slider'></span>
<span id="labelTip">往右拖动验证</span>
</div>
<script>
//JS初始化
$(function () {
var slider = new SliderUnlock("#slider",{
successLabelTip : "验证通过"
},function(){
//此处是验证成功之后执行的代码
});
slider.init();
});
</script>
</body>
</html>