-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfly.html
53 lines (53 loc) · 1.29 KB
/
fly.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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style>
span{
position: absolute;
top:470px;
left:100px;
width:40px;
height:40px;
background-color: #0dff1d;
border-radius: 50%;
}
</style>
</head>
<body>
<button>点我</button>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<span></span>
<script type="text/javascript" src="fly/jquery.js"></script>
<script type="text/javascript" src="fly/jquery.fly.min.js"></script>
<script>
$(function(){
$('button').click(function(){
/*$('span').css({
background:'#f0f'
});*/
$('span').fly({
start: {
left:100 , //抛物体起点横坐标
top: 470////抛物体起点纵坐标
},
end: {
left:550, //抛物体终点横坐标
top: 300 //抛物体终点纵坐标
},
onEnd: function() {
// $("#tip").show().animate({width: '200px'}, 300).fadeOut(500);//成功加入购物车动画效果
this.destory();//销毁抛物体
}
});
});
});
</script>
</body>
</html>