OLD | NEW |
---|---|
(Empty) | |
1 <!doctype HTML> | |
2 <style> | |
3 body { | |
4 margin: 0; | |
5 } | |
6 ::-webkit-scrollbar { | |
7 display: none; | |
8 } | |
9 #scroller { | |
10 background: gray; | |
11 height: 300px; | |
12 overflow: scroll; | |
13 position: relative; | |
14 z-index: 0; | |
15 } | |
16 | |
17 #content { | |
18 overflow: hidden; | |
19 position: relative; | |
20 background-color: white; | |
21 width: 1000px; | |
22 height: 1000px; | |
23 top: 50px; | |
24 } | |
25 </style> | |
26 <!-- The test succeeds if white is visible across all of the visible scrolling a rea, and no gray --> | |
27 <div id="scroller"> | |
28 <div id="content"></div> | |
29 <div style="position: relative; z-index: -1; will-change: transform"></div> | |
30 </div> | |
31 <script> | |
32 onload = function() { | |
33 scroller.scrollTop = 50; | |
34 } | |
35 </script> | |
OLD | NEW |