在<section>
之间滚动时,活动菜单状态无效。在基于<section>
.setPin()
{?}}进行滚动时,scrollMagic中是否有任何选项可以始终设置活动状态?
var controller = new ScrollMagic.Controller({
globalSceneOptions: {
duration: $('section').height(),
triggerHook: .025,
reverse: true
}
});
$("section").each(function() {
new ScrollMagic.Scene({
triggerElement: this,
duration: '50%',
triggerHook: 0.025,
reverse: true
})
.setPin(this)
.addTo(controller);
});
演示:http://codepen.io/mobrndstr/pen/pymGoQ
导航菜单.active
状态在滚动时在两个部分之间移除。
<section class="feature" id="intro">
部分.setPin()
在<section class="feature" id="intro">
到<section class="feature" id="feature">
活动状态消失之间
.active
statu <section class="feature" id="feature">
已设为setPin()