1
0
Fork 0
firefox/testing/web-platform/tests/css/css-anchor-position/position-visibility-no-overflow-scroll-ref.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

30 lines
621 B
HTML

<!DOCTYPE html>
<style>
#scroll-container {
overflow: hidden scroll;
width: 400px;
height: 150px;
}
.anchor {
width: 100px;
height: 100px;
background: orange;
display: inline-block;
}
.target {
width: 100px;
height: 100px;
}
</style>
<div id="scroll-container">
<div class="anchor">anchor1</div>
<div class="anchor" style="position: relative; top: 100px">anchor2</div>
<div id="target1" class="target" style="background: green">target1</div>
<div style="height: 200px"></div>
</div>
<script>
document.getElementById('scroll-container').scrollTop = 50;
</script>