blob: 64cf0f5578128f9a08964dd1ace8fcdfe54cbf1e [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
/*
The object-fit:cover property causes the image to be scaled to 200x200 and then centered. The shape-outside
is clipped to the image-shape's margin-box, which means that the Ahem text will appear 50 pixels to the right
of the IMG element.
*/
#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: cover;
margin-right: 300px;
}
#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<br>X
</div>
</body>
</html>