CSS polygon() Function

❮ Previous Functions Next ❯


.example {
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);


The polygon() css function defines a polygon using an SVG fill-rule and a set of vertices.

Version: CSS3

Standard Syntax

polygon( [fill-rule,]? [shape-arg shape-arg]# )

Browser Support

The numbers in the table specify the first browser version that fully supports the property.


Function Arguments

The following table describes the arguments of this function.

Argument Description
fill-rule An optional value of nonzero (the default when omitted) or evenodd, which specifies the filling rule.
shape-arg shape-arg Three or more pairs of values (a polygon must at least draw a triangle). These values are co-ordinates drawn with reference to the reference box.
❮ Previous Functions Next ❯