Files
sousa-gecko/testing/web-platform/tests/scroll-animations/scroll-timelines/animation-ref.html
T
Antoine Quint 00307a98cd Bug 2016806 [wpt PR 57786] - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=307785, a=testonly
Automatic update from web-platform-tests
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=307785 (#57786)

--

wpt-commits: 75432af98fb4fa28308ac8301b35b1258c16ab33
wpt-pr: 57786
2026-02-18 09:33:40 +00:00

46 lines
937 B
HTML

<!DOCTYPE html>
<title>Reference for Web Animation with scroll timeline tests</title>
<style>
#box {
width: 100px;
height: 100px;
background-color: green;
transform: translate(0, 100px);
opacity: 0.5;
will-change: transform; /* force compositing */
}
#covered {
width: 100px;
height: 100px;
background-color: red;
}
#scroller {
overflow: hidden;
height: 100px;
width: 100px;
will-change: transform; /* force compositing */
}
#contents {
height: 1000px;
width: 100%;
}
</style>
<div id="box"></div>
<div id="covered"></div>
<div id="scroller">
<div id="contents"></div>
</div>
<script>
window.addEventListener('load', function() {
// Move the scroller to halfway.
const scroller = document.getElementById("scroller");
const maxScroll = scroller.scrollHeight - scroller.clientHeight;
scroller.scrollTop = 0.5 * maxScroll;
});
</script>