Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<meta charset="utf-8">
<title>SVG coordinate systems: transform attribute on the outermost svg element (reference)</title>
<link rel="author" title="Nikolas Zimmermann" href="mailto:nzimmermann@igalia.com">
<style>
.container { display: flex; width: 600px; height: 200px; background-color: gold; }
</style>
<div class="container">
<svg width="200" height="200" fill="none" stroke="white" stroke-width="3.75">
<rect x="40.2" y="43.2" width="50" height="35" rx="5"/>
<path d="M40.2 55.7h50"/>
</svg>
<svg width="200" height="200">
<rect x="10" y="35" width="80" height="80" fill="green"/>
</svg>
<svg width="200" height="200">
<rect x="30" y="35" width="160" height="160" fill="green"/>
</svg>
</div>