from
from 屬性指示將在動畫期間修改的屬性的初始值。
當與 to 屬性一起使用時,動畫會將修改後的屬性從 from 值更改為 to 值。當與 by 屬性一起使用時,動畫將根據 by 中指定的值,從 from 值相對地更改該屬性。
你可以將此屬性與以下 SVG 元素一起使用
示例
html
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<rect x="10" y="10" height="100">
<animate attributeName="width" fill="freeze" from="100" to="150" dur="3s" />
</rect>
</svg>
用法說明
| 值 | 參見下文 |
|---|---|
| 預設值 | None |
| 可動畫的 | 否 |
此屬性的確切值型別取決於將要設定動畫的屬性的值。
當透過 values 屬性定義值列表時,將忽略 from 屬性。
規範
| 規範 |
|---|
| SVG 動畫級別 2 # FromAttribute |
瀏覽器相容性
載入中…