Movatterモバイル変換


[0]ホーム

URL:


  1. 面向开发者的 Web 技术
  2. SVG:可缩放矢量图形
  3. 参考
  4. SVG 属性参考
  5. attributeName

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in EnglishAlways switch to English

attributeName

attributeName 属性表示动画期间将要更改的目标元素的 CSS 属性或属性的名称。

你可以将此属性与以下 SVG 元素一起使用:

示例

html,body,svg {  height: 100%;}
html
<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>

使用说明

<name>
默认值None
动画性
  • <name>
    • :此值表示要动画化的目标元素的 CSS 属性或属性的名称。

规范

Specification
SVG Animations Level 2
# AttributeNameAttribute

参见

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp