snapshot-containing-block-static-iframe-ref.html (531B)
1 <!DOCTYPE html> 2 <html> 3 <title>View transitions: use snapshot containing block for static position in iframe (ref)</title> 4 <link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/#snapshot-containing-block-concept/"> 5 6 <style> 7 #inner { 8 width: 400px; 9 height: 200px; 10 } 11 </style> 12 <iframe id="inner" srcdoc=" 13 <style> 14 body { 15 height: 200vh; 16 background: limegreen; 17 overflow: hidden; 18 } 19 </style> 20 <body></body> 21 "></iframe> 22 23 <script> 24 onload = () => { 25 inner.contentWindow.scrollTo(0, 100); 26 }; 27 </script>