OLD | NEW |
(Empty) | |
| 1 <!-- |
| 2 Copyright 2013 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 <body onload="myDisplay.update()"> |
| 18 <div id="myDisplayDiv"></div> |
| 19 <script type="text/javascript" src="try-it-yourself.js"></script> |
| 20 <script type="text/javascript" src='tutorial-testing.js'></script> |
| 21 <script type="text/javascript" src='../web-animations.js'></script> |
| 22 <script type="text/javascript" src='../test/extra-asserts.js'></script> |
| 23 <link type="text/css" href="../animation-test-style.css"> |
| 24 <link rel="stylesheet" type="text/css" href="tutorial-style.css"> |
| 25 <script> |
| 26 "use strict"; |
| 27 |
| 28 var myDisplay = new TryItDisplay(document.getElementById("myDisplayDiv")); |
| 29 myDisplay.setDefaultHtml("<div id='a' class='test'></div>"); |
| 30 var css = ".test {" + |
| 31 "\n" + "background-color: red;" + |
| 32 "\n" + "border-radius: 10px;" + |
| 33 "\n" + "width: 100px;" + |
| 34 "\n" + "height: 50px;" + |
| 35 "\n" + "top: 50px;" + |
| 36 "\n" + "left: 0px;" + |
| 37 "\n" + "position: absolute;" + |
| 38 "\n" + "}"; |
| 39 myDisplay.setDefaultCss(css); |
| 40 myDisplay.setDefaultAnimationEndTime(2); |
| 41 myDisplay.addCheck("document.getElementById('a')", "{'left': '0px'}", 0); |
| 42 myDisplay.addCheck("document.getElementById('a')", "{'left': '300px'}", 2); |
| 43 </script> |
| 44 </body> |
OLD | NEW |