OLD | NEW |
(Empty) | |
| 1 <style> |
| 2 body { |
| 3 margin: 0; |
| 4 } |
| 5 |
| 6 .scroller { |
| 7 overflow: auto; |
| 8 height: 300px; |
| 9 width: 250px; |
| 10 } |
| 11 |
| 12 .container { |
| 13 width: 200px; |
| 14 height: 2000px; |
| 15 } |
| 16 |
| 17 .outerIndicator { |
| 18 position: absolute; |
| 19 top: 50px; |
| 20 background-color: green; |
| 21 width: 200px; |
| 22 height: 200px; |
| 23 } |
| 24 |
| 25 .middleIndicator { |
| 26 position: absolute; |
| 27 top: 50px; |
| 28 background-color: yellow; |
| 29 width: 200px; |
| 30 height: 100px; |
| 31 } |
| 32 |
| 33 .innerIndicator { |
| 34 position: absolute; |
| 35 top: 25px; |
| 36 background-color: red; |
| 37 width: 200px; |
| 38 height: 50px; |
| 39 } |
| 40 </style> |
| 41 |
| 42 <script> |
| 43 if (window.testRunner) |
| 44 testRunner.waitUntilDone(); |
| 45 |
| 46 function finishTest() { |
| 47 document.querySelector('.scroller').scrollTop = 200; |
| 48 if (window.testRunner) |
| 49 testRunner.notifyDone(); |
| 50 } |
| 51 |
| 52 window.addEventListener('load', function() { |
| 53 requestAnimationFrame(function() { |
| 54 requestAnimationFrame(finishTest); |
| 55 }); |
| 56 }); |
| 57 </script> |
| 58 |
| 59 <div class="scroller"> |
| 60 <div class="container"> |
| 61 <div class="outerIndicator"> |
| 62 <div class="middleIndicator"> |
| 63 <div class="innerIndicator"></div> |
| 64 </div> |
| 65 </div> |
| 66 </div> |
| 67 </div> |
OLD | NEW |