fill-box-mutation-002.html (823B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <title>transform-box: fill-box, image mutated</title> 4 <link rel="match" href="reference/greensquare200x200.html"> 5 <link rel="help" href="https://drafts.csswg.org/css-transforms/#transform-box"> 6 <style> 7 #target { 8 transform-box: fill-box; 9 transform: translate(-50%, 0); 10 } 11 </style> 12 <p>There should be a green 200x200 rectangle below, and no red.</p> 13 <svg width="400" height="200"> 14 <rect width="200" height="200" fill="red"/> 15 <image id="target" x="100" width="100" height="200" 16 href="/css/css-transforms/support/1x1-green.png"/> 17 </svg> 18 <script> 19 requestAnimationFrame(function() { 20 requestAnimationFrame(function() { 21 document.querySelector('#target').setAttribute('width', 200); 22 document.documentElement.classList.remove('reftest-wait'); 23 }); 24 }); 25 </script>