participating-scope.html (698B)
1 <!DOCTYPE html> 2 <html class="test-wait"> 3 <head> 4 <style> 5 body { margin: 5px; } 6 #scope { contain: strict; position: relative; z-index: 0; 7 width: 150px; height: 100px; border: 5px solid #ccc; 8 view-transition-name: container; } 9 .item { width: 6rem; height: 4rem; margin: 10px; background: #def; 10 view-transition-name: a1; contain: strict; } 11 ::view-transition-group(*), 12 ::view-transition-old(*), 13 ::view-transition-new(*) { animation: unset; } 14 </style> 15 </head> 16 <body> 17 <div id="scope"><div class="item"></div></div> 18 <script> 19 onload = async () => { 20 await scope.startViewTransition().finished; 21 document.documentElement.classList.remove('test-wait'); 22 } 23 </script> 24 </body> 25 </html>