且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用jQuery延迟后翻译(逐步-带有动画)一个svg元素

更新时间:2023-10-24 23:39:58

有可能.我刚刚对您的setTimeOut进行了一些更改.检查这是否是您想要的:

Well it is possible. I just made some changes to your setTimeOut. Check if this is what you want:

setTimeout(function () {
     $("#cubeTop")
    .animate(
      {"min-height": -140},
      {duration: 1000,
       step: function( top ){
           this.setAttribute("transform", "translate(0,"+top+")");
         }
       });
}, 3000);

这是 演示

Here is the DEMO