3

間をスクロールしている間、アクティブなメニュー ステータスが機能しない<section><section>に基づいてスクロールしている間、スクロールマジックに常にアクティブステータスを設定するオプションはあります.setPin()か?

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のステータスは、スクロール中に 2 つのセクションの間で削除されます。


<section class="feature" id="intro">セクション_.setPin()

ここに画像の説明を入力


アクティブ状態に<section class="feature" id="intro">なるまでの間<section class="feature" id="feature">

ここに画像の説明を入力


そして.activeステータス<section class="feature" id="feature">は次のように設定されていますsetPin()

ここに画像の説明を入力

4

0 に答える 0