forked from blackMao/velocity-ui-pack-extra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
executable file
·53 lines (51 loc) · 1.11 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
<html>
<head>
<meta charset="utf-8">
<title>动画效果测试</title>
<link rel="stylesheet" href="magic.css">
<style>
.square{width: 48px;height: 48px;background: url('http://www.baomitu.com/resource/img/icon-logo.png');border: 2px solid #f70;}
</style>
</head>
<body>
<div>
<div style="float:left;margin-left:35%;">
<div class="square magictime"></div>
</div>
</div>
<script src="http://libs.useso.com/js/zepto/1.1.3/zepto.js" ></script>
<script src="http://s3.qhimg.com/!459c46d4/velocity.js"></script>
<script src="http://s2.qhimg.com/!d5907f22/velocity.ui.js"></script>
<script src="velocity.animation.js"></script>
<script>
$(function() {
var $div = $('.square');
var quene = [
{
name: 'fadeInUp',
duration: 2,
delay: 0,
loop: 1
},
{
name: 'bounce',
duration: 1,
delay: 1,
loop: true
},
];
//velocity使用方式
/*$div.velocity('bounce', {
duration: 1000,
delay: 1000,
loop: true
});*/
//封装新方法
MsAnimation.runAnimation('.square', quene, function() {
alert('结束');
});
});
</script>
</body>
</html>
</html>