我对这个代码有问题:
Codepn project
我希望每次向下滚动时都能看到下一个部分出现。同时,只有第二个显示。。。
我想得到的效果是:
LOOK THIS WEBSITE
显示我正在使用的:
function handleMouseWheelDirection( direction )
{
console.log( direction ); // see the direction in the console
if ( direction == 'down' ) {
goNextSlide();
} else if ( direction == 'up' ) {
goPrevSlide();
} else {
// this means the direction of the mouse wheel could not be determined
}
}
const goNextSlide = () =>{
TweenMax.to(sectionMain, 2, {x:0, y:-100} );
TweenMax.to(slide1, 0, {delay:0.4, x:0, y:0, ease: Power4.easeOut, display:"block" } );
}
请看代码笔,以便更好地理解我。有什么想法吗?谢谢。