<path>

Элемент <path> является общим элементом для описания фигуры. Все базовые фигуры могут быть созданы с помощью элемента path.

Пример

html
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
  <path
    d="M 10,30
           A 20,20 0,0,1 50,30
           A 20,20 0,0,1 90,30
           Q 90,60 50,90
           Q 10,60 10,30 z" />
</svg>

Атрибуты

d

Этот атрибут определяет форму. Тип значения: <string> ; Значение по умолчанию: ''; Анимирование: Да

pathLength (en-US)

Этот атрибут позволяет указывать общую длину в пользовательских единицах. Тип значения: <number> ; Значение по умолчанию:нет; Анимирование: Да

Глобальные атрибуты

Атрибуты ядра

Most notably: id, tabindex (en-US)

Атрибуты стиля
class, style (en-US)
Атрибуты условной обработки

Most notably: 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

Использование

КатегорииГрафические элементы, Элемент фигуры
Разрешённый контентЛюбое количество следующих элементов, в любом порядке:
Элементы анимации
Элементы описания

Спецификация

Specification
Scalable Vector Graphics (SVG) 2
# PathElement

Совместимость с браузерами

BCD tables only load in the browser

Смотрите также