我有一个我喜欢用fullpage.js视差效果的触发器触发的动画。
我想在每次fullpage.js切换部分时执行此操作。
我想要执行的代码Css:
.mask-white{
width: 100vw;
background-color: white;
position: absolute;
top: 0;
left: 0;
z-index: 22222;
animation: height-white 1s;
}
@keyframes height-white {
0%{
height: 0vh;
bottom: 0;
}
50%{
height: 100vh;
}
100%{
height: 0vh;
top: auto;
bottom: 0;
}
}我希望每次请假被调用时执行1次。
... fullpage.js code is above ...
onLeave: function(){
}这个函数每次切换时都被调用,这就是我想要的。
发布于 2018-04-18 13:30:06
只需将类mask-white添加到您希望在onLeave回调中的元素上。
查看如何处理基于我的视频中的css3状态类的回调或fullpage.js动画的示例:https://www.youtube.com/watch?v=qiCVPpI9l3M
https://stackoverflow.com/questions/49881302
复制相似问题