out-of-flow-svg-root-ref.html (843B)
1 <!DOCTYPE html> 2 <html> 3 <link rel="help" href="https://www.w3.org/TR/SVG2/coords.html"> 4 <style> 5 section { margin-bottom: 10px; } 6 div { background: rgba(255, 0, 0, 0.15) } 7 svg { background: rgba(0, 0, 255, 0.15) } 8 </style> 9 <body> 10 <section> 11 <div style="position: relative; width: 240px; height: 340px;"> 12 <svg style="position: absolute;" width="240" height="240" 13 xmlns="http://www.w3.org/2000/svg"></svg> 14 </div> 15 </section> 16 <section> 17 <div style="position: relative; width: 300px; height: 200px"> 18 <div style="position: absolute; width: 300px; height: 200px;"> 19 <svg style="position: absolute;" width="200" height="200" 20 xmlns="http://www.w3.org/2000/svg"></svg> 21 </div> 22 </div> 23 </section> 24 </body> 25 </html>