<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 |
瀏覽器相容性
載入中…