2017-08-28 6 views
0

Foundation 6を使用してスティッキーヘッダーを作成しましたが、トランジションを受け入れていないため、うんざりです。一番上のバーはジャーキーに見えます。誰でも援助があり、問題がどこにあるのか教えてください。私は次のものに欠けているものが不明です。以下は、私のコードです:スティッキーバーのトランジションの問題

<header class="site-header" role="banner"> 
    <div class="site-title-bar title-bar" <?php foundationpress_title_bar_responsive_toggle() ?> data-responsive-toggle="example-menu" data-hide-for="large"> 
     <div class="title-bar-left"> 
     <button class="menu-icon" type="button" data-toggle="example-menu off-canvas-menu"></button> 
     </div> 
    </div> 
    <div class="mobile-logo"> 
     <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><img src="<?php echo get_template_directory_uri(); ?>/assets/images/logo.png" alt="Logo" width="HERE" height="HERE" /></a> 
    </div> 
    <div class="top-bar-container" data-sticky-container> 
     <div class="sticky" data-sticky data-options="anchor: page; marginTop: 0; stickyOn: small;" style="width:100%; z-index:2"> 
     <nav class="site-navigation top-bar topbar-sticky-shrink row columns align-middle" id="example-menu" role="navigation"> 
      <div class="row align-middle"> 
       <div class="columns small-12"> 
        <?php foundationpress_utility_bar(); ?> 
       </div> 
      </div> 
      <div class="row align-middle main-nav"> 
       <div class="top-bar-left columns"> 
        <div class="site-desktop-title top-bar-title"> 
        <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><img src="<?php echo get_template_directory_uri(); ?>/assets/images/logo.png" alt="Logo" width="368" height="61" /></a> 
        </div> 
       </div> 
       <div class="top-bar-right columns"> 
        <?php foundationpress_top_bar_r(); ?> 
        <?php if (! get_theme_mod('wpt_mobile_menu_layout') || get_theme_mod('wpt_mobile_menu_layout') === 'topbar') : ?> 
        <?php get_template_part('template-parts/mobile-top-bar'); ?> 
        <?php endif; ?> 
       </div> 
      </div> 
     </nav> 
     </div> 
    </div> 
    <div class="row align-center cta"> 
     <div class="columns medium-4 small-12"> 
     <a href="#" "> 
      <div class="button button-primary "><img src="<?php echo get_template_directory_uri(); ?>/assets/images/icon-apply.png" alt="Logo" width="26" height="29" />&nbsp;Apply today 
      </div> 
     </a> 
     </div> 
     <div class="columns medium-4 small-12"> 
     <a href="#" "> 
      <div class="button button-secondary "><img src="<?php echo get_template_directory_uri(); ?>/assets/images/icon-tour.png" alt="Logo" width="39" height="29" />&nbsp;Book a tour</div> 
     </a> 
     </div> 
     <div class="columns medium-4 small-12"> 
     <a href="#" "> 
      <div class="button button-tertiary "><img src="<?php echo get_template_directory_uri(); ?>/assets/images/icon-donate.png" alt="Logo" width="35" height="29" />&nbsp;Make a donation</div> 
     </a> 
     </div> 
    </div> 
</header> 

マイサスファイルには、次のものが含まれています

$topbar-sticky-shrink-padding: 1rem 0; // controls the un-stuck height of topbar 
$topbar-sticky-shrink-padding-stuck: 0; // controls the is stuck height of topbar 
$topbar-sticky-shrink-bg: #2c3840; 

.sticky { 
    background-color: $white; 
} 

.topbar-sticky-shrink { 
    padding:$topbar-sticky-shrink-padding; 
    transition: padding 0.25s ease; 

    .menu { 
    } 
} 

.is-stuck .topbar-sticky-shrink { 
    padding: $topbar-sticky-shrink-padding-stuck; 
    transition: padding 0.25s ease; 
} 

答えて

0

修正が$topbar-sticky-shrink-paddinグラムと$topbar-sticky-shrink-padding-stuckの両方に同じパディングを与えることです。

関連する問題