在fullpage.js中淡出过渡

时间:2016-06-23 21:57:39

标签: jquery fullpage.js

我想使用fullpage来制作个人网站。如何更换淡入淡出过渡而不是滑动效果来更改节之间?

Fullpage.js演示:http://alvarotrigo.com/fullPage

1 个答案:

答案 0 :(得分:1)

你必须用下面的css覆盖整页转换, 如果有作品,请告诉我

.fullpage-wrapper {
width: 100%!important;
transform: none!important;
}

.fp-section {
width: 100%!important;
position: absolute;
left: 0;
top: 0;
visibility: hidden;
opacity: 0;
z-index: 0;
transition: all .7s ease-in-out;
}

.fp-section.active {
visibility: visible;
opacity: 1;
z-index: 1;
}

<强>更新  要向css转换添加回调,您必须将事件绑定到父section,如

$("yourSection").one('webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend',   
function(e) {

// code to execute after transition ends

});