--- title: attributeName slug: Web/SVG/Attribute/attributeName tags: - NeedsCompatTable - SVG - SVG атрибуты translation_of: Web/SVG/Attribute/attributeName ---
Атрибут attributeName задаёт имя свойства CSS или атрибута целевого элемента, которое будет изменено во время анимации.
Четыре элемента используют данный атрибут: {{SVGElement("animate")}}, {{SVGElement("animateColor")}}, {{SVGElement("animateTransform")}} и {{SVGElement("set")}}
html, body, svg {
height: 100%;
}
<svg viewBox="0 0 250 250" xmlns="http://www.w3.org/2000/svg">
<rect x="50" y="50" width="100" height="100">
<animate attributeType="XML" attributeName="y" from="0" to="50"
dur="5s" repeatCount="indefinite"/>
</rect>
</svg>
{{EmbedLiveSample("topExample", "400", "250")}}
| Значение | <name> |
|---|---|
| Значение по умолчанию | None |
| Анимируемый | Нет |
<name>| Specification | Status | Comment |
|---|---|---|
| {{SpecName("SVG Animations 2", "#AttributeNameAttribute", "attributeName")}} | {{Spec2("SVG Animations 2")}} | No change |
| {{SpecName("SVG1.1", "animate.html#AttributeNameAttribute", "attributeName")}} | {{Spec2("SVG1.1")}} | Initial definition |