2 <title>Scroll timeline with WorkletAnimation using a scroller with overflow hidden
</title>
7 background-color: green;
8 transform: translate(
0,
100px);
10 will-change: transform; /* force compositing */
16 background-color: red;
23 will-change: transform; /* force compositing */
33 <div id=
"covered"></div>
35 <div id=
"contents"></div>
39 window
.addEventListener('load', function() {
40 // Move the scroller to halfway.
41 const scroller
= document
.getElementById("scroller");
42 const maxScroll
= scroller
.scrollHeight
- scroller
.clientHeight
;
43 scroller
.scrollTop
= 0.5 * maxScroll
;