Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width initial-scale=1">
<link rel="match" href="position-sticky-on-minimum-scale-ref.html">
<style>
html {
scrollbar-width: none;
}
body {
width: 200vw;
margin: 0px;
}
div {
width: 50vw;
height: 100px;
display: inline-block;
background: blue;
}
.sticky {
position: sticky;
right: 0;
background: red;
}
.fixed {
position: fixed;
right: 0px;
top: 0px;
background: white;
z-index: -1;
}
</style>
<div></div><div></div><div></div><div class="sticky"></div>
<div class="fixed"></div>
<script>
document.querySelector(".fixed").scrollIntoView({ behavior: "instant" });
document.documentElement.classList.remove("reftest-wait");
</script>
</html>