<polygon>
Baseline 广泛可用 *
<polygon>
SVG 元素定义了一个由一系列连接的直线段组成的闭合形状。最后一个点连接到第一个点。
对于开放形状,请参阅 <polyline>
元素。
使用语境
属性
DOM 接口
此元素实现了 SVGPolygonElement
接口。
示例
html
<svg viewBox="0 0 200 100" xmlns="http://www.w3.org/2000/svg">
<!-- Example of a polygon with the default fill -->
<polygon points="0,100 50,25 50,75 100,0" />
<!-- Example of the same polygon shape with stroke and no fill -->
<polygon points="100,100 150,25 150,75 200,0" fill="none" stroke="black" />
</svg>
规范
规范 |
---|
Scalable Vector Graphics (SVG) 2 # PolygonElement |
浏览器兼容性
加载中…