blob: ac3161372a3c62a744c4e2ad07e1cff21a2b2340 [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;
-webkit-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;
-webkit-font-smoothing: antialiased;
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>