OLD | NEW |
| (Empty) |
1 <!-- | |
2 Copyright 2012 Google Inc. All Rights Reserved. | |
3 | |
4 Licensed under the Apache License, Version 2.0 (the "License"); | |
5 you may not use this file except in compliance with the License. | |
6 You may obtain a copy of the License at | |
7 | |
8 http://www.apache.org/licenses/LICENSE-2.0 | |
9 | |
10 Unless required by applicable law or agreed to in writing, software | |
11 distributed under the License is distributed on an "AS IS" BASIS, | |
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 See the License for the specific language governing permissions and | |
14 limitations under the License. | |
15 --> | |
16 | |
17 <!DOCTYPE html><meta charset="UTF-8"> | |
18 <style> | |
19 .anim { | |
20 left: 0px; | |
21 width: 200px; | |
22 height: 24px; | |
23 background-color: lightsteelblue; | |
24 position: relative; | |
25 border-bottom: solid white 1px; | |
26 } | |
27 | |
28 #expectation { | |
29 position: absolute; | |
30 left: 200px; | |
31 width: 200px; | |
32 height: 275px; | |
33 background: red; | |
34 } | |
35 body { margin: 0px; } | |
36 </style> | |
37 | |
38 <div id="expectation"></div> | |
39 | |
40 <div> | |
41 <div id="a" class="anim">(default)</div> | |
42 <div class="anim test" id="b">ease-in</div> | |
43 <div class="anim test" id="c">ease-out</div> | |
44 <div class="anim test" id="d">cubic-bezier(0, 0.2, 0.8, 1)</div> | |
45 <div class="anim test" id="e">steps(3, start)</div> | |
46 <div class="anim test" id="f">steps(3, middle)</div> | |
47 <div class="anim test" id="g">steps(3, end)</div> | |
48 <div class="anim test" id="h">cubic-bezier(0.5, -1.5, 0.5, 2.5)</div> | |
49 <div class="anim test" id="i">step-start</div> | |
50 <div class="anim test" id="j">step-middle</div> | |
51 <div class="anim test" id="k">step-end</div> | |
52 </div> | |
53 | |
54 <div style="height:50px"></div> | |
55 | |
56 <script> | |
57 var expected_failures = [ | |
58 { | |
59 browser_configurations: [{ msie: true }], | |
60 tests: ['Autogenerated at t=(1200.0*1|1600|2000)ms'], | |
61 message: 'Returns matrix3d.', | |
62 } | |
63 ]; | |
64 </script> | |
65 <script src="../bootstrap.js"></script> | |
66 <script> | |
67 "use strict"; | |
68 | |
69 document.timeline.play(new Animation(document.querySelector("#a"), | |
70 {left: "200px"}, {delay: 1 * 1000, duration: 2 * 1000, fill: 'forwards'})); | |
71 var elems = document.querySelectorAll(".test"); | |
72 for (var i = 0; i < elems.length; i++) { | |
73 var element = elems[i]; | |
74 document.timeline.play(new Animation(element, {left: "200px"}, | |
75 {delay: 1 * 1000, duration: 2 * 1000, easing: element.textContent, fill: '
forwards'})); | |
76 } | |
77 </script> | |
OLD | NEW |