<animateColor>

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the 兼容性表格 at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

警告: This element has been deprecated in SVG 1.1 Second Edition and may be removed in a future version of SVG. It provides no features not already available by using the <animate> element. So, authors should use the <animate> element instead.

<animateColor> SVG element specifies a color transformation over time.

Usage context

类别 Basic shape element, Graphics element, Shape element
准许内容 Any number of the following elements, in any order:
Descriptive elements

属性

全局属性

Specific attributes

DOM Interface

This element implements the SVGAnimateColorElement 接口。

范例

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


>



					

结果

规范

规范
Scalable Vector Graphics (SVG) 1.1 (Second Edition) (SVG)
# AnimateColorElement

浏览器兼容性

BCD tables only load in the browser

另请参阅

Found a problem with this page?

最后修改: , 由 MDN 贡献者