如何动画CSS翻译 [英] How to animate CSS Translate
本文介绍了如何动画CSS翻译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以通过jquery动画化CSS属性?
Is it possible to animate the CSS property translate via jquery?
$('.myButtons').animate({"transform":"translate(50px,100px)"})
?
演示无效: http://jsfiddle.net/ignaciocorreia/xWCVf/
更新:
我的解决方案:
- 简单的实现 - http://jsfiddle.net/ignaciocorreia/ R3EaJ /
- 复杂的实施和多浏览器 - http://ricostacruz.com /jquery.transit/
- Simple implementations - http://jsfiddle.net/ignaciocorreia/R3EaJ/
- Complex implementation and multi-browser - http://ricostacruz.com/jquery.transit/
推荐答案
$('div').css({"-webkit-transform":"translate(100px,100px)"});
这篇关于如何动画CSS翻译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文