Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<?xml version="1.0"?>
<!--
Any copyright is dedicated to the Public Domain.
-->
<head>
<title>Test viewBox translating out-of-viewport rect into viewport</title>
<style>
div, svg {
display: block;
position: absolute;
width: 100px;
height: 100px;
}
</style>
</head>
<body bgcolor="lime">
<div style="background:red;"/>
<svg viewBox="100 0 100 100" xmlns="http://www.w3.org/2000/svg">
<rect x="100" y="0" width="100" height="100" fill="lime"/>
</svg>
</body>
</html>