Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>Reference: object-fit fill lays out an SVG with a natural size in the whole box, which fits its viewBox inside</title>
<link rel="author" title="Sam Weinig" href="mailto:sam@webkit.org">
<style>
body { margin: 0; }
</style>
<div style="position: absolute; left: 50px; top: 0; width: 50px; height: 100px; background-color: rgb(0,0,255)"></div>
<div style="position: absolute; left: 100px; top: 0; width: 50px; height: 100px; background-color: rgb(0,128,0)"></div>