<polygon>
Элемент <polygon>
описывает замкнутую фигуру, состоящую из набора последовательно соединённых между собой прямых линий. Для создания незамкнутых фигур используется элемент <polyline>
(en-US).
<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>
Атрибуты
points (en-US)
-
Данный атрибут определяет список точек (независимых пар x,y координат), необходимых для отрисовки фигуры. Тип значения: <number>+ ; Значение по умолчанию:
""
; Анимируемый: да pathLength (en-US)
-
Данный атрибут позволяет указывать общую длину пути в пользовательских единицах. Тип значения: <number> ; Значение по умолчанию: none; Анимируемый: да
Global attributes
- Основные атрибуты
-
Самые важные:
id
,tabindex (en-US)
- Атрибуты стилизации
class
,style (en-US)
- Условные атрибуты
-
Самые важные:
requiredExtensions
,systemLanguage (en-US)
- Атрибуты событий
- Presentation Attributes
-
Most notably:
clip-path (en-US)
,clip-rule (en-US)
,color (en-US)
,color-interpolation (en-US)
,color-rendering
,cursor (en-US)
,display (en-US)
,fill
,fill-opacity
,fill-rule
,filter (en-US)
,mask (en-US)
,opacity (en-US)
,pointer-events (en-US)
,shape-rendering
,stroke
,stroke-dasharray (en-US)
,stroke-dashoffset
,stroke-linecap
,stroke-linejoin (en-US)
,stroke-miterlimit (en-US)
,stroke-opacity (en-US)
,stroke-width
,transform
,vector-effect (en-US)
,visibility (en-US)
- ARIA-атрибуты
-
aria-activedescendant
,aria-atomic
,aria-autocomplete
,aria-busy
,aria-checked
,aria-colcount
,aria-colindex
,aria-colspan
,aria-controls
,aria-current
,aria-describedby
,aria-details
,aria-disabled
,aria-dropeffect
,aria-errormessage
,aria-expanded
,aria-flowto
,aria-grabbed
,aria-haspopup
,aria-hidden
,aria-invalid
,aria-keyshortcuts
,aria-label
,aria-labelledby
,aria-level
,aria-live
,aria-modal
,aria-multiline
,aria-multiselectable
,aria-orientation
,aria-owns
,aria-placeholder
,aria-posinset
,aria-pressed
,aria-readonly
,aria-relevant
,aria-required
,aria-roledescription
,aria-rowcount
,aria-rowindex
,aria-rowspan
,aria-selected
,aria-setsize
,aria-sort
,aria-valuemax
,aria-valuemin
,aria-valuenow
,aria-valuetext
,role
Usage notes
Категории | Базовые фигуры, Графические элементы, Фигура |
---|---|
Разрешённый контент | Любое количество следующих элементов, в любом порядке: Элементы анимации Элементы описания |
Спецификации
Specification |
---|
Scalable Vector Graphics (SVG) 2 # PolygonElement |
Совместимость с браузерами
BCD tables only load in the browser
Смотрите также
- Другие базовые фигуры SVG:
<circle>
,<ellipse>
,<line>
,<polyline>
(en-US),<rect>