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