-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.html
90 lines (88 loc) · 2.03 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
86
87
88
89
90
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
html,body{
height: 100%;
overflow: hidden;
background: url(images/bg.gif);
}
.container{
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
.container .page{
position: absolute;
width: 100%;
height: 100%;
}
.container .page0{
top: 0;
left: 0;
background-color: pink;
}
.container .page1{
top: 10%;
left: 110%;
background-color: blue;
}
.container .page2{
top: 120%;
left: 10%;
background-color: green;
}
.container .page3{
top: 130%;
left: 130%;
background-color: orange;
}
.cur{
width: 240px;
height: 207px;
background: url(images/1.png) no-repeat;
}
</style>
<script type="text/javascript" src="jquery-1.11.2.min.js"></script>
<script type="text/javascript">
$(function(){
$(".page0 input").click(function(){
$(".container").animate({"top":"-10%","left":"-110%"},1000);
})
$(".page1 input").click(function(){
$(".container").animate({"top":"-120%","left":"-10%"},1000);
})
$(".page2 input").click(function(){
$(".container").animate({"top":"-130%","left":"-130%"},1000);
})
$(".page3 input").click(function(){
$(".container").animate({"top":"0%","left":"0%"},1000);
})
})
</script>
</head>
<body>
<div class="container">
<div class="page page0">
<input type="button" value="点我去下一个页面"/>
</div>
<div class="page page1">
<input type="button" value="点我去下一个页面"/>
</div>
<div class="page page2">
<input type="button" value="点我去下一个页面"/>
</div>
<div class="page page3">
<input type="button" value="点我去第1个页面"/>
</div>
</div>
</body>
</html>