forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanimation-direction.html
More file actions
61 lines (50 loc) · 1.29 KB
/
animation-direction.html
File metadata and controls
61 lines (50 loc) · 1.29 KB
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
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
#container {
position: relative;
border: 1px solid black;
height: 100px;
width: 500px;
}
#box {
position: absolute;
height: 100px;
width: 100px;
background-color: blue;
-webkit-animation-name: move;
-webkit-animation-duration: 2s;
-webkit-animation-direction: alternate;
-webkit-animation-iteration-count: 2;
-webkit-animation-timing-function: linear;
}
@-webkit-keyframes move {
0% {
left: 0;
}
100% {
left: 400px;
}
}
</style>
<script src="resources/animation-test-helpers.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
const expectedValues = [
// [animation-name, time, element-id, property, expected-value, tolerance]
["move", 0.5, "box", "left", 100, 20],
["move", 1.5, "box", "left", 300, 20],
["move", 2.5, "box", "left", 300, 20],
["move", 3.5, "box", "left", 100, 20],
];
runAnimationTest(expectedValues);
</script>
</head>
<body>
<!-- Test animation-direction: alternate -->
<div id="container">
<div id="box"></div>
</div>
<div id="result"></div>
</body>
</html>