-
Notifications
You must be signed in to change notification settings - Fork 475
/
Copy path07 animations.html
101 lines (92 loc) · 2.04 KB
/
07 animations.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>07</title>
<script src="vue.js"></script>
<style>
.bounce-transition {
display: inline-block;
}
.bounce-enter {
-webkit-animation: bounce-in .5s;
animation: bounce-in .5s;
}
.bounce-leave {
-webkit-animation: bounce-out .5s;
animation: bounce-out .5s;
}
@keyframes bounce-in {
0% {
-webkit-transform: scale(0);
transform: scale(0);
}
50% {
-webkit-transform: scale(1.5);
transform: scale(1.5);
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
}
}
@keyframes bounce-out {
0% {
-webkit-transform: scale(1);
transform: scale(1);
}
50% {
-webkit-transform: scale(1.5);
transform: scale(1.5);
}
100% {
-webkit-transform: scale(0);
transform: scale(0);
}
}
@-webkit-keyframes bounce-in {
0% {
-webkit-transform: scale(0);
transform: scale(0);
}
50% {
-webkit-transform: scale(1.5);
transform: scale(1.5);
}
100% {
-webkit-transform: scale(1);
transform: scale(1);
}
}
@-webkit-keyframes bounce-out {
0% {
-webkit-transform: scale(1);
transform: scale(1);
}
50% {
-webkit-transform: scale(1.5);
transform: scale(1.5);
}
100% {
-webkit-transform: scale(0);
transform: scale(0);
}
}
</style>
</head>
<body>
<div id="anim" class="demo">
<span v-show="show" transition="bounce">Look at me!</span>
<br>
<button @click="show=!show">Toggle</button>
</div>
<script>
new Vue({
el: '#anim',
data: {
show: true
}
})
</script>
</body>
</html>