首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >StaggerTo动画

StaggerTo动画
EN

Stack Overflow用户
提问于 2017-03-27 06:16:00
回答 1查看 259关注 0票数 0

我试着用staggerTo在视频横幅上做一个级联动画,但是它不起作用。我要级联动画在横幅上展开点击。我的代码是

代码语言:javascript
运行
复制
function FullscreenClick(e){
    ADTECH.expand();
    ADTECH.registerVideoPlayer(videoBGPlayer , 'VideoExpanded');
    videoBGPlayer.removeEventListener('timeupdate',timeCheck,false);
    TweenLite.to(wrapper , 1 , { height: 546 });
    TweenLite.staggerTo( videoBGPlayer , 1 , {bottom:"+=150",  ease:CubicIn.ease}, 0.2);
    TweenLite.to( audioOn , 0.4 , { opacity: 1  }  );

    fullscreenButton.style.visibility = 'hidden';
    fomButton.style.visibility = 'visible';
    videoBGPlayer.load();
    videoBGPlayer.play();
    videoBGPlayer.muted = false;
    closeButton.style.visibility = 'visible';
    window.parent.postMessage('ExpandCreative', '*');
    expanded = true;
}

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-03-28 10:32:17

假设弹性是你想要的效果类型,那么下面的代码应该可以工作。其他放松效果和配置可以在GSAP文档上找到

代码语言:javascript
运行
复制
function FullscreenClick(e){
ADTECH.expand();
ADTECH.registerVideoPlayer(videoBGPlayer , 'VideoExpanded');
videoBGPlayer.removeEventListener('timeupdate',timeCheck,false);
TweenLite.to(wrapper , 1 , { height: 546 });
TweenLite.to( videoBGPlayer , 1 , {bottom:"+=150",  ease: Elastic.easeOut.config(1, 0.3)});
TweenLite.to( audioOn , 0.4 , { opacity: 1  }  );

fullscreenButton.style.visibility = 'hidden';
fomButton.style.visibility = 'visible';
videoBGPlayer.load();
videoBGPlayer.play();
videoBGPlayer.muted = false;
closeButton.style.visibility = 'visible';
window.parent.postMessage('ExpandCreative', '*');
expanded = true;
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43039109

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档