Tween运动封装
let moveAnimation = Math.animation(50, 600, function (value) {
document.querySelector('#target2').style.left = value+'px';
}, 'Quart.easeOut', 1400);
cancelAnimationFrame(moveAnimation()); // 暂停动画
Tween运动封装
Tween运动封装
let moveAnimation = Math.animation(50, 600, function (value) {
document.querySelector('#target2').style.left = value+'px';
}, 'Quart.easeOut', 1400);
cancelAnimationFrame(moveAnimation()); // 暂停动画
Tween运动封装