blob: 4391c9916024c7ac1ebfe395f875fc548196e6a1 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
/*
The object-fit: contain property causes the 10x10 SVG image to be scaled to 100x100 and centered within the image-shape's
100x200 bounds.
*/
#image-shape {
float: left;
shape-outside: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10px' height='10px'><rect width='10' height='10' fill='blue'/></svg>");
width: 100px;
height: 200px;
object-fit: contain;
}
#content {
font: 50px/1 Ahem, sans-serif;
color: green;
}
</style>
<div id="content">
<img id="image-shape"
src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10px' height='10px'><rect width='10' height='10' fill='blue'/></svg>"/>
X<br>X<br>X<br>X
</div>
</body>
</html>