航路点和视差效果

时间:2019-12-11 11:58:39

标签: parallax jquery-waypoints

我想实现视差效果-移动txt,但我不知道如何使用Waypoints来实现。通过滚动事件,我可以像这样触发它:

this.$window.on('scroll', this.triggerElements.bind(this));

triggerElements(){
    let hScroll = this.$window.scrollTop();
 this.headerOverlay.css({
     'transform' : 'translate(0px, '+hScroll/4+'%)'
    });}

我已经在项目中使用Waypoint,所以我不想使用Waypoint以外的其他方式来实现它。谢谢

0 个答案:

没有答案