SVGAnimationElement:beginElementAt() 方法
SVGAnimationElement
方法 beginElementAt()
会在当前时间加上指定的偏移量来创建一个开始实例时间。新的实例时间会被添加到开始实例时间列表中。
语法
js
beginElementAt(offset)
参数
offset
-
一个浮点数,表示开始元素的时间相对于当前文档时间的偏移量(以秒为单位)。
返回值
None
示例
此示例演示了如何使用 beginElementAt()
在延迟 2 秒后启动一个动画元素。
js
const animationElement = document.querySelector("animate");
animationElement.beginElementAt(2);
console.log("Animation will start after a 2-second delay.");
规范
规范 |
---|
SVG 动画级别 2 # __svg__SVGAnimationElement__beginElementAt |
浏览器兼容性
加载中…