Game Development Reference
In-Depth Information
display: inline-block;
float: left;
width: 300px;
height: 400px;
shape-outside: polygon(0 0, 100% 50%, 0 100%);
}
</style>
<div>
<span class="shape"> </span>
<h2>Lorem Ipsum</h2>
<p>Lorem ipsum dolor sit amet, consectetuer
adipiscing elit, sed diam nonummy nibh euismod
tincidunt ut laoreet dolore magna aliquam erat
volutpat. Ut wisi enim ad minim veniam, quis
nostrud exerci tation ullamcorper suscipit
lobortis nisl ut aliquip ex ea commodo
consequat. Duis autem vel eum iriure dolor in
hendrerit in vulputate velit esse molestie
consequat, vel illum dolore eu feugiat nulla
facilisis at vero eros et accumsan et iusto
odio dignissim qui blandit praesent luptatum
zzril delenit augue duis dolore te feugait
nulla facilisi.</p>
</div>
Alternatively, we can use the companion property to shape-outside , namely
shape-inside . Intuitively, this property defines the opposite as its counterpart.
Whereas a shape-outside property tells the browser where text needs to flow
around (outside), a shape-inside property tells the browser the area where the
text must stay within. All property values are the same for both attributes. The only
difference between the two attributes is that in shape-outside , text is placed well
outside of the placeholder element. With shape-inside , any text to be guided with-
in the shape defined is placed as a descendant node of the shape element.
Search WWH ::




Custom Search