-
Notifications
You must be signed in to change notification settings - Fork 2
/
animation-timing-function.html
64 lines (52 loc) · 1.14 KB
/
animation-timing-function.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
<!DOCTYPE html>
<html>
<head>
<title>CSS Animation</title>
<style>
div {
width: 100px;
height: 50px;
background-color: rgb(153, 0, 255);
position: relative;
animation-name: example;
animation-duration: 5s;
/* infinite, 1, 2, 3, 4, 5 */
animation-iteration-count: infinite;
/* normal|reverse|alternate|alternate-reverse */
animation-direction: alternate;
/* running*/
animation-play-state: paused;
}
.linear {
animation-timing-function: linear;
}
.ease {
animation-timing-function: ease;
}
.ease-in {
animation-timing-function: ease-in;
}
.ease-out {
animation-timing-function: ease-out;
}
.ease-in-out {
animation-timing-function: ease-in-out;
}
@keyframes example {
from {
left: 0px;
}
to {
left: calc(100% - 100px);
}
}
</style>
</head>
<body>
<div class="linear">linear</div>
<div class="ease">ease</div>
<div class="ease-in">ease-in</div>
<div class="ease-out">ease-out</div>
<div class="ease-in-out">ease-in-out</div>
</body>
</html>