forked from lvivski/animatic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
parallel_css.html
83 lines (82 loc) · 1.66 KB
/
parallel_css.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Matrix</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<style>
.block {
border-radius: 50%;
}
</style>
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<div class="block"></div>
</body>
<script src="../anima.js"></script>
<script>
var world = anima.css(),
item = world.add(document.querySelector('.block'))
item
.animate([
{
translate: [0, 300, 0],
ease: 'ease-in-quad'
},{
translate: [100, 0, 0]
}
], 500)
.animate([
{
translate: [0, -200, 0],
ease: 'ease-out-quad'
},{
translate: [70, 0, 0]
}
], 450)
.animate([
{
translate: [0, 200, 0],
ease: 'ease-in-quad'
},{
translate: [70, 0, 0]
}
], 400)
.animate([
{
translate: [0, -100, 0],
ease: 'ease-out-quad'
},{
translate: [50, 0, 0]
}
], 350)
.animate([
{
translate: [0, 100, 0],
ease: 'ease-in-quad'
},{
translate: [50, 0, 0]
}
], 300)
.animate([
{
translate: [0, -50, 0],
ease: 'ease-out-quad'
},{
translate: [20, 0, 0]
}
], 200)
.animate([
{
translate: [0, 50, 0],
ease: 'ease-in-quad'
},{
translate: [20, 0, 0]
}
], 150)
.css()
</script>
</html>