原因在於scroll時動畫不斷重新play,在progress加上.pause()即可解決:

$(window).on("scroll", function(){
var top = $(window).scrollTop();
var percentofprogress=(top+$(window).height())/($(document).height()-$(window).height());
//console.log(top);
//console.log(top/($doc.height()-$win.height()));
tl.progress(percentofprogress).pause();
} )

 

case #thebodyshop

arrow
arrow
    全站熱搜

    陳阿全 發表在 痞客邦 留言(0) 人氣()