-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
50 lines (50 loc) · 931 Bytes
/
example.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
<!DOCTYPE html>
<html>
<head>
<title>Animate Demo</title>
<script type="text/javascript" src="dist/browser.js"></script>
</head>
<body>
<span class="random-class">this is a test</span>
<script type="text/javascript">
animate()
.kf({
'25%, 75%': {
background: 'orange'
},
50: {
'padding-right': '100px',
background: 'red'
},
100: {
background: 'none'
}
})
.kf({
name: 'bounce',
50: {
'margin-left': '500px'
}
})
.query('.random-class')
.set('keyframe-0 1s 2')
.on('AnimationIteration', function (animate) {
console.log('woohoo!', animate);
})
.play()
.then(function (animate) {
return animate
.set('bounce 2s 4')
.set({
name: 'keyframe-0',
duration: '1s',
'iterationCount': 10
})
.play();
})
.then(function (animate) {
console.log('finished everything', animate);
})
</script>
</body>
</html>