【问题标题】:animejs - move relative to current positionAnimejs - 相对于当前位置移动
【发布时间】:2017-01-30 18:25:00
【问题描述】:

我正在尝试将 div 相对于animejs 中的当前位置移动

var myAnimation = anime({
   targets: ['.location'],
  translateY: "-300px",
  easing: 'linear',
   delay: function(el, index) {
    return index * 80;
  },
  duration: 500,
  loop: false
});
})

我试过了

 translateY: "-=300px",

没有成功。有什么想法吗?

【问题讨论】:

    标签: javascript animation css-transitions


    【解决方案1】:

    尝试通过 js 获取您的起点,并用括号具体说明它。 像这样:

    property: [startpoint, endpoint]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-07-23
      • 1970-01-01
      • 2023-03-13
      • 1970-01-01
      • 2021-10-09
      • 2013-07-26
      • 1970-01-01
      • 2014-11-20
      相关资源
      最近更新 更多