| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 | |
| 3 <html> | |
| 4 <head> | |
| 5 <title>Transitioning object-position</title> | |
| 6 <style> | |
| 7 #box { | |
| 8 width: 400px; | |
| 9 height: 400px; | |
| 10 object-position:-50px -50px; | |
| 11 transition-duration: 0.5s; | |
| 12 transition-timing-function: linear; | |
| 13 transition-property: object-position; | |
| 14 } | |
| 15 </style> | |
| 16 <script src="../animations/resources/animation-test-helpers.js"></script
> | |
| 17 <script> | |
| 18 const expectedValues = [ | |
| 19 // [time, element-id, property, expected-value, tolerance] | |
| 20 [0.25, 'box', 'object-position', "25px 75px", 10] | |
| 21 ]; | |
| 22 | |
| 23 function setupTest() | |
| 24 { | |
| 25 document.getElementById('box').style.objectPosition = "100px 200
px"; | |
| 26 } | |
| 27 runTransitionTest(expectedValues, setupTest); | |
| 28 </script> | |
| 29 </head> | |
| 30 <body> | |
| 31 <img id="box" src="../animations/resources/stripes-100.png"> | |
| 32 <div id="result"></div> | |
| 33 </body> | |
| 34 </html> | |
| OLD | NEW |