<!DOCTYPE html>
<html dir="rtl">
<title>View transitions: use snapshot containing block for absolute position (ref)</title>
<link rel="help" href="https://drafts.csswg.org/css-view-transitions-2/">
<link rel="author" href="mailto:[email protected]">
<script>
if (window.internals) {
window.internals.settings.setPlaceRTLScrollbarsOnLeftSideInMainFrame(true);
}
</script>
<style>
:root {
background-color: red;
}
body {
height: 400vh;
}
#target {
position: absolute;
left: 200px;
top: 300px;
width: 100px;
height: 100px;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
background: darkseagreen;
}
#background {
position: absolute;
right: 100px;
top: 200px;
width: calc(100% - 100px);
height: calc(100% - 200px);
background-color: limegreen;
}
</style>
<div id="background"></div>
<div id="target">TARGET</div>