翻译成.js
一个简单的 jQuery 插件,用于硬件加速 CSS 转换,带有优雅的 .animate() 回退
现在有了 Modernizr 支持! (Modernizr.css3dtransforms)
用法:
$(element).translateTo(x, y, duration);
默认值(持续时间总是以毫秒为单位):
x: 0,
y: 0,
duration: 300
打回来:
.on('animationEnd');
移动东西:
$('#stage1 .box').on('click', function() {
$(this).translateTo(421, 156, 2666);
});
完成动画后做一些事情:
$('#stage2 .box')
.on('click', function() {
$(this).translat