2017-05-18 111 views

回答

1

你必须使用的getComputedStyle()函数:

setInterval(function(){ 
    path = document.getElementById("path1"); 
    console.log(window.getComputedStyle(path).strokeDashoffset) 
},50) 

http://jsfiddle.net/46cmu71t/39/