<!-- Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/ --> <html> <style> #b { width: 200px; height: 200px; background-color: rgb(0,255,0); } #c { z-index: 1; position: absolute; top:100px; } </style> <div id="b"> <svg width="100" height="100" viewBox="0 0 100 100" > <rect style="fill:#000000;" width="100" height="100"/> </svg> <div id="c"> <svg width="100" height="100" viewBox="0 0 100 100" > <rect style="fill:#00FF00;" width="100" height="100"/> </svg> </div> </div> </html>