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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Timing Functions for Transitions</title>
<style type="text/css" media="screen">
body {
margin: 10px;
padding: 0;
}
.container div {
position: relative;
width: 250px;
height: 50px;
background: #99c;
-webkit-transition-property: left;
-webkit-transition-duration: 5s;
margin-bottom: 10px;
}
.container:hover .default,
.container:hover .ease,
.container:hover .linear,
.container:hover .ease-in,
.container:hover .ease-out,
.container:hover .ease-in-out,
.container:hover .cubic,
.container:hover .error {
left: 400px;
}
.container .ease {
-webkit-transition-timing-function: ease;
}
.container .linear {
-webkit-transition-timing-function: linear;
}
.container .ease-in {
-webkit-transition-timing-function: ease-in;
}
.container .ease-out {
-webkit-transition-timing-function: ease-out;
}
.container .ease-in-out {
-webkit-transition-timing-function: ease-in-out;
}
.container .cubic {
-webkit-transition-timing-function: cubic-bezier(.42, .0, .58, 1.0)
}
.container .error {
-webkit-transition-timing-function: bananas;
}
#endmarker {
position: absolute;
width: 10px;
left: 400px;
top: 100px;
height: 500px;
background-color: red;
}
</style>
</head>
<body>
<div id="endmarker">
</div>
<h1>Timing functions for transitions</h1>
<p>On hover, the elements below should transition using the
described timing functions</p>
<div class="container">
<div class="default">
Default (no timing function specified, should be the same as Ease)
</div>
<div class="ease">
Ease (the default ease function)
</div>
<div class="linear">
Linear
</div>
<div class="ease-in">
Ease In
</div>
<div class="ease-out">
Ease Out
</div>
<div class="ease-in-out">
Ease In Out
</div>
<div class="cubic">
Cubic bezier specified the same as Ease In Out
</div>
<div class="error">
Bogus definition, should become default of Ease
</div>
</div>
</body>
</html>
|