ジャンプ先:

この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください!
この記事を English (US) で読むこともできます。

« SVG Attribute reference home

This attribute indicates the final value of the attribute that will be modified during the animation. The value of the attribute will change between the from attribute value and this value. By default the change will be linear.

When this attribute is used with the <set> element, it specifies the value for the attribute during the duration of the <set> element.

Usage context

Categories Animation value attribute
Value <value>
Animatable No
Normative document SVG 1.1 (2nd Edition)
SVG 1.1 (2nd Edition) : The set element

The exact value type for this attribute depend on the value of the attribute that will be animated.

Example

This example uses a value of 150 for the to attribute, so the shape will animate to a height of 150.

<?xml version="1.0"?>
<svg width="200" height="200"
  viewBox="0 0 200 200" version="1.1"
  xmlns="http://www.w3.org/2000/svg">
    
  <rect x="10" y="10" width="100" height="100">
    <animate attributeType="XML"
      attributeName="height"
      from="100" to="150"
      dur="3s"
      fill="freeze"/>
  </rect>
    
</svg>

Elements

The following elements can use the to attribute

ドキュメントのタグと貢献者

このページの貢献者: mdnwebdocs-bot, HTMLValidator, SueSmith, Jeremie, sebmozilla
最終更新者: mdnwebdocs-bot,