Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Reference: preserveAspectRatio on an image element fits a referenced SVG that has only a viewBox</title>
<link rel="author" title="Sam Weinig" href="mailto:sam@webkit.org">
<style>
body { margin: 0; }
</style>
<svg width="220" height="120">
<rect x="10" y="10" width="100" height="100" fill="rgb(0,128,0)"/>
</svg>