/
test.html
58 lines (54 loc) · 1.29 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
54
55
56
57
58
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>r_animate test</title>
</head>
<body>
<div class="playground">
<div id="rect"></div>
</div>
</body>
<script type="module">
import { r, act } from "https://unpkg.com/r_animate/index.js";
const rect = document.getElementById('rect')
r(rect)
.r_animate({
transform: 'scale([1~2])',
loop: 1,
loop_mode: 'alternate'
})
.r_animate({
transform: 'scale([1~0.5])',
loop: '3 alternate'
})
.r_animate(act.EMPHASIZE.SHAKE_X)
.r_animate(act.EMPHASIZE.SHAKE_Y)
.r_animate(act.EMPHASIZE.SHAKE_ROTATE)
.r_animate(act.OUT.BLUR)
.r_animate(act.IN.BLUR)
.r_animate(act.OUT.OPACITY)
.r_animate(act.IN.OPACITY)
.r_animate(act.OUT.SCROLL_DOWN)
.r_animate(act.IN.SCROLL_DOWN)
.r_animate(act.OUT.SCROLL_UP)
.r_animate(act.IN.SCROLL_UP)
</script>
<script>
</script>
</html>
<style>
#rect {
position: absolute;
width: 100px;
height: 100px;
background-color: #444444;
}
.playground {
display: flex;
justify-content: center;
align-items: center;
margin: auto;
margin-top: 50vh;
}
</style>