1
0
Fork 0
firefox/testing/web-platform/tests/css/css-view-transitions/snapshot-containing-block-static-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

37 lines
714 B
HTML

<!DOCTYPE html>
<html>
<title>View transitions: use snapshot containing block for static position (ref)</title>
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
<link rel="author" href="mailto:bokan@chromium.org">
<style>
body {
height: 400vh;
background-color: limegreen;
}
div {
position: absolute;
left: 200px;
top: 600px;
width: 100px;
height: 100px;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
background: darkseagreen;
}
</style>
<div id="target">TARGET</div>
<script>
onload = () => {
const scrollTargetY = document.getElementById('target').offsetTop - 100;
window.scrollTo(0, scrollTargetY);
};
</script>