to

从当前目标值动画到指定值。
必须在本地补间参数Object中定义。

必填

仅当未从 属性定义

接受

默认

如果仅定义了 a from 属性,则使用当前目标值

到代码示例

import { animate } from 'animejs';

animate('.square', {
  x: {
    to: '16rem', // From 0px to 16rem
    ease: 'outCubic',
  },
  rotate: {
    to: '.75turn', // From 0turn to .75turn
    ease: 'inOutQuad'
  },
});
<div class="large row">
  <div class="square"></div>
</div>