Javascript JQuery 动画左和缩放

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10132763/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 00:00:40  来源:igfitidea点击:

JQuery animate left and scale

javascriptjqueryjquery-ui

提问by Vahan

Hi I need to scale and animate div left same time.

嗨,我需要同时缩放和动画 div。

Something like this.

像这样的东西。

$('#div').effect('scale'{percent:200},
'animate',{left:200});

Thanks.

谢谢。

This is the solution I found.

这是我找到的解决方案。

 $('#div').effect('scale'{percent:200},1000);
 $('#div').animate({left:100,top:100},1000);
 $('#div').fadeTo(1100,0));

采纳答案by adeneo

$('#div').animate({
   left: 200,
   height: ($(this).height()*2),
   width: ($(this).width()*2)
}, 1000);