zindex-part.html (548B)
1 <!DOCTYPE html> 2 <html class="test-wait"> 3 <head> 4 <style> 5 6 #scope { 7 position: relative; width: 100px; height: 100px; 8 background: #ddd; contain: strict; 9 } 10 #part { 11 position: absolute; top: 10px; left: 10px; 12 width: 80px; height: 80px; background: #8cf; 13 z-index: 1; view-transition-name: foo; 14 } 15 16 </style> 17 </head> 18 <body> 19 <div id=scope><div id=part></div></div> 20 <script> 21 22 onload = async () => { 23 t = scope.startViewTransition(() => {}); 24 await t.finished; 25 document.documentElement.classList.remove('test-wait'); 26 }; 27 28 </script> 29 </body> 30 </html>