【发布时间】:2017-05-18 22:25:20
【问题描述】:
所以我尝试使用 javascript 增加 svg 的 stroke-dashoffset css,但我无法获得任何 svg 路径的当前 stroke-dashoffset。
这是一个jsfiddle,通过这种方式在控制台中可见:
setInterval(function(){
path = document.getElementById("path1");
console.log(path.style.strokeDashoffset)
},50)
如何获得路径的计算当前 stroke-dashoffset 值?
【问题讨论】:
标签: javascript css svg