已废弃
该特性已经从 Web 标准中删除,虽然一些浏览器目前仍然支持它,但也许会在未来的某个时间停止支持,请尽量不要使用该特性。
该元素在SVG1.1 第二版中不建议使用,在将来的SVG版本中可能被移除。它提供的功能,在<animate>元素中都可用,而且不能在火狐或Internet Explorer中实现。作者必须使用<animate>元素代替它。
<animateColor> SVG元素指定了一个颜色随着时间的变换。
用法
| 类别 | 基本元素, 图形元素, 形状元素 |
|---|---|
| 允许的内容物 | 任意数量、任意排序的下列元素: 描述性元素 |
属性
全局属性
特定属性
DOM Interface
This element implements the SVGAnimateColorElement interface.
Example
SVG
<svg width="120" height="120" xmlns="http://www.w3.org/2000/svg">
<circle cx="60" cy="60" r="50">
<animateColor attributeName="fill" attributeType="XML"
from="black" to="red" dur="6s" repeatCount="indefinite"/>
</circle>
</svg>
Result
Specifications
| Specification | Status | Comment |
|---|---|---|
| Scalable Vector Graphics (SVG) 1.1 (Second Edition) <animateColor> |
Recommendation | Initial definition |
Browser compatibility
| Feature | Chrome | Edge | Firefox (Gecko) | IE | Opera | Safari |
|---|---|---|---|---|---|---|
| Basic support | 未实现 | 未实现 | 未实现 | 未实现 | 未实现 | ? |
| Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | ? | ? | ? | ? | ? |
See also