-
Notifications
You must be signed in to change notification settings - Fork 1
/
drastic.txt
72 lines (53 loc) · 1.13 KB
/
drastic.txt
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
<html>
<head>
<style>
div { width: 200px; height: 200px;
background: yellow; margin: 10px;
position: absolute;
left: 20vm;
border-radius: 50%;
transition: all 1s;
}
.different { background: pink;
width: 100px; height: 100px;
border: 20px solid white;
position: absolute;
left: 20%;
top: 20%;
}
div:hover { transform: scale (2); }
.animate {
animation-name: bounceIn;
animation-duration: 1s;
animation-iteration-count: 1;
animation-direction: alternate;
animation-timing-function: ease-out;
animation-fill-mode: forwards;
animation-delay: 0s;
}
@keyframes bounceIn {
0% {
transform: scale(0.1);
opacity: 0;
}
60% {
transform: scale(1.2);
opacity: 1;
}
100% {
transform: scale(1);
}
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
</head>
<body>
<div></div>
<div class="different"></div>
<script>
$(".different").click(function() {
$(this).toggleClass("animate");
});
</script>
</body>
</html>