0

I am trying to use the transform "scale" for a DIV using Jquery's animate function but it is not showing any effect. Can someone tell if "transforms" are supported in Jquery's animate function. I also tried JQuery's UI/Effect "scale" method but as I am not sure if it is supported as it is throwing aan error that the "property" is not supported by the object. Might be possibly because I am using it on a metro app.

4

2 回答 2

1

在你的代码中包含这个文件

 jquery.transform2d.js

然后使用 animate 函数来缩放 div

$("div").animate({"transform" : "scale(2)"});
于 2012-06-30T05:01:54.107 回答
0

您可以使用 Transit 插件进行 css 转换 http://ricostacruz.com/jquery.transit/

Jquery animate 函数只接受那些具有数值的属性。

阅读本文了解更多详情http://www.w3schools.com/jquery/jquery_animate.asp

这应该会有所帮助。

于 2016-10-26T12:13:39.797 回答