Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-backgrounds/background-clip/clip-text-on-body-scroll.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<title>background-clip:text on body after scrolling</title>
<link rel="match" href="clip-text-on-body-scroll-ref.html">
<style>
body {
font-size: 50px;
background-clip: text;
height: 2000px;
margin: 0;
overflow: hidden;
}
</style>
<script>
window.addEventListener('load', () => {
window.scrollTo(0, 600);
requestAnimationFrame(() => {
requestAnimationFrame(() => {
document.documentElement.classList.remove('reftest-wait');
});
});
});
</script>
<body>
This text should become invisible after scrolling. No background artifacts should appear.
</body>
</html>