我想使用fullpage来制作个人网站。如何更换淡入淡出过渡而不是滑动效果来更改节之间?
Fullpage.js演示:http://alvarotrigo.com/fullPage
答案 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
});