forked from learning-zone/css-basics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransition-timing-function.html
69 lines (64 loc) · 1.47 KB
/
transition-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
65
66
67
68
69
<!DOCTYPE html>
<html>
<head>
<title>The transition-timing-function Property</title>
<style>
div {
width: 100px;
height: 100px;
background: red;
-webkit-transition: width 2s; /* Safari */
transition: width 2s;
}
/* For Safari 3.1 to 6.0 */
#div1 {
-webkit-transition-timing-function: linear;
}
#div2 {
-webkit-transition-timing-function: ease;
}
#div3 {
-webkit-transition-timing-function: ease-in;
}
#div4 {
-webkit-transition-timing-function: ease-out;
}
#div5 {
-webkit-transition-timing-function: ease-in-out;
}
/* Standard syntax */
#div1 {
transition-timing-function: linear;
}
#div2 {
transition-timing-function: ease;
}
#div3 {
transition-timing-function: ease-in;
}
#div4 {
transition-timing-function: ease-out;
}
#div5 {
transition-timing-function: ease-in-out;
}
div:hover {
width: 300px;
}
</style>
</head>
<body>
<h1>The transition-timing-function Property</h1>
<p>Hover over the div elements below, to see the different speed curves:</p>
<div id="div1">linear</div>
<br />
<div id="div2">ease</div>
<br />
<div id="div3">ease-in</div>
<br />
<div id="div4">ease-out</div>
<br />
<div id="div5">ease-in-out</div>
<br />
</body>
</html>