OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <head> |
| 3 <style> |
| 4 #box { |
| 5 position: absolute; |
| 6 left: 0; |
| 7 top: 100px; |
| 8 height: 100px; |
| 9 width: 100px; |
| 10 background-color: blue; |
| 11 -webkit-animation-duration: 1s; |
| 12 -webkit-animation-timing-function: linear; |
| 13 -webkit-animation-name: anim; |
| 14 -webkit-animation-fill-mode: forwards; |
| 15 } |
| 16 </style> |
| 17 <script src="resources/animation-test-helpers.js"></script> |
| 18 </head> |
| 19 <body> |
| 20 <div id="box"> |
| 21 </div> |
| 22 <script> |
| 23 document.getElementById('box').offsetTop; |
| 24 </script> |
| 25 <style> |
| 26 /* An animation which couldn't start due to missing keyframes |
| 27 Should start once those keyframes are defined. */ |
| 28 @-webkit-keyframes anim { |
| 29 from { left: 200px; } |
| 30 to { left: 300px; } |
| 31 } |
| 32 </style> |
| 33 <script> |
| 34 var expectedValues = [ |
| 35 // [animation-name, time, element-id, property, expected-value, tolerance] |
| 36 ["anim", 1, "box", "left", 300, 1], |
| 37 ]; |
| 38 runAnimationTest(expectedValues); |
| 39 </script> |
| 40 <div id="result"> |
| 41 </div> |
| 42 </body> |
| 43 </html> |
OLD | NEW |