<animate>
<animatecolor>
<animatemotion>
<animatetransform>
<discard>
<mpath>
<set>
<feBlend>
<feColorMatrix>
<feComponentTransfer>
<feComposite>
<feConvolveMatrix>
<feDiffuseLighting>
<feDisplacementMap>
<feDistantLight>
<feFlood>
<feFuncA>
<feFuncB>
<feFuncG>
<feFuncR>
<feGaussianBlur>
<feImage>
<feMerge>
<feMergeNode>
<feMorphology>
<feOffset>
<fePointLight>
<feSpecularLighting>
<feSpotLight>
<feTile>
<feTurbulence>
<filter>
<font>
<font-face>
<font-face-format>
<font-face-name>
<font-face-src>
<font-face-uri>
<foreignObject>
The SVG
<set>
element provides a simple means of just setting the value of an attribute for a specified duration.
It supports all attribute types, including those that cannot reasonably be interpolated, such as string and boolean values. For attributes that can be reasonably be interpolated, the
<animate>
is usually preferred.
注意:
<set>
element is non-additive. The
additive
and
accumulate
attributes are not allowed, and will be ignored if specified.
<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
<style>
rect { cursor: pointer }
.round { rx: 5px; fill: green; }
</style>
<rect id="me" width="10" height="10">
<set attributeName="class" to="round" begin="me.click" dur="2s" />
</rect>
</svg>
to
This attribute defines the value to be applied to the target attribute for the duration of the animation. The value must match the requirements of the target attribute. Value type : <anything> ; 默认值 : none; Animatable : no
begin
,
dur
,
end
,
min
,
max
,
restart
,
repeatCount
,
repeatDur
,
fill
Most notably:
attributeName
Most notably:
id
class
,
style
| 类别 | Animation element |
|---|---|
| 准许内容 |
Any number of the following elements, in any order:
Descriptive elements |
| 规范 |
|---|
|
SVG Animations Level 2
(SVG Animations 2)
# SetElement |
BCD tables only load in the browser
最后修改: , 由 MDN 贡献者