| <!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> |
| <html> |
| <head> |
| <style> |
| body { |
| margin: 0; |
| } |
| |
| #scroller { |
| direction: rtl; |
| overflow-x: scroll; |
| margin: 10px; |
| height: 300px; |
| width: 300px; |
| } |
| |
| .contents { |
| width: 200%; |
| height: 100%; |
| background-image: linear-gradient(to right, green, green 50%, red 50%, red); |
| } |
| |
| .scrollbar-hider { |
| position: absolute; |
| width: 300px; |
| height: 16px; |
| left: 10px; |
| top: calc(310px - 16px); |
| background-color: gray; |
| } |
| </style> |
| <script> |
| window.addEventListener('load', () => { |
| scroller.scrollLeft = -300; |
| }, false); |
| </script> |
| </head> |
| <body> |
| <div id="scroller"> |
| <div class="contents"></div> |
| </div> |
| <div class="scrollbar-hider"></div> |
| </body> |
| </html> |