background-ref.html (369B)
1 <!doctype html> 2 <meta charset=utf-8> 3 <style> 4 div { 5 position: relative; 6 } 7 svg { 8 display: block; 9 margin: auto; 10 } 11 </style> 12 <body> 13 <div> 14 <svg xmlns='http://www.w3.org/2000/svg' width='100px' height='200px' 15 viewport='0 0 100 200'> 16 <rect x='0' y='100' width='100' height='100' fill='purple'> 17 </rect> 18 </svg> 19 </div> 20 </body>