Game Development Reference
In-Depth Information
}
svg polygon {
fill: #c33;
}
</style>
<div>
<svg xmlns="http://www.w3.org/2000/svg">
<polygon points="0, 0, 300, 200, 0,
400"></polygon> </svg>
<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>
One thing that might be a bit tricky about CSS exclusions is that it simply defines a
shape or path for the text to flow around and not necessarily a shape or path to be
rendered. In other words, the two highlighted lines of code in the previous code ex-
ample are completely independent. The only reason that the two polygon definitions
resemble each other closely is for visual effects. If we had used an image, a div , or
any other HTML element inside that block of text, the CSS shape-outside prop-
erty would still cause the text to flow around that element the same way, no matter
what physical shape that element has. Simply adding a CSS shape attribute to an
element will not alter its own visual properties.
Search WWH ::




Custom Search