1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
6 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
7 <title>Animation using matrix()
</title>
8 <style type=
"text/css" media=
"screen">
12 background-color: blue;
13 -webkit-animation-duration:
1s;
14 -webkit-animation-timing-function: linear;
15 -webkit-animation-name: anim;
17 @-webkit-keyframes anim {
18 from { transform: matrix(
0.707, -
0.707,
0.707,
0.707,
0,
0); }
19 to { transform: matrix(
0.707,
0.707, -
0.707,
0.707,
0,
0); }
22 <script src=
"resources/animation-test-helpers.js" type=
"text/javascript" charset=
"utf-8"></script>
23 <script type=
"text/javascript" charset=
"utf-8">
26 const expectedValues = [
27 // [time, element-id, property, expected-value, tolerance]
28 [
0.5,
"box",
"webkitTransform", [
1,
0,
0,
1,
0,
0],
0.1],
31 runAnimationTest(expectedValues);
36 This test performs an animation of the matrix operator. It animates over
2 seconds.
37 At
1 second it takes a snapshot and expects the result to be within range.