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 '/Autogenerated at t=(1.20*1|1.6|2)s/': { |
| 59 msie: true, |
| 60 message: "Returns 'matrix3d'." |
| 61 } |
| 62 }; |
| 63 </script> |
| 64 <script src="../bootstrap.js"></script> |
| 65 <script> |
| 66 "use strict"; |
| 67 |
| 68 document.timeline.play(new Animation(document.querySelector("#a"), |
| 69 {left: "200px"}, {delay: 1, duration: 2, fill: 'forwards'})); |
| 70 var elems = document.querySelectorAll(".test"); |
| 71 for (var i = 0; i < elems.length; i++) { |
| 72 var element = elems[i]; |
| 73 document.timeline.play(new Animation(element, {left: "200px"}, |
| 74 {delay: 1, duration: 2, easing: element.textContent, fill: 'forwards'})); |
| 75 } |
| 76 </script> |
OLD | NEW |