簡體   English   中英

粘性頁腳不會在要求處停止,在底部反彈

[英]Sticky footer doesn't stop where requested, bounces at bottom

我正在使用scrollToFixed將頁腳粘貼到頁面底部,直到它碰到實際的頁腳然后它應該停止。 但是,它會滾動到頁面底部並通過頁腳和按鈕到頁腳頂部。 任何想法為什么會發生這個錯誤? 這是實際網站的鏈接: http//client.analog.la/ret5/

jQuery('#scroller').scrollToFixed({
    bottom: 0,
    limit:  function() { 
    var limit = 0;
        if (jQuery(window).height() > jQuery('#page').height()) {
            jQuery('#colophon').css({'position':'fixed','bottom':'0'});
            jQuery('#scroller').css({'position':'fixed','bottom':'40px'});
        }else {
             jQuery('#colophon').css({'position':'static'});
             limit = jQuery('#scroller').offset().top + 40;
        } return limit;
        }

});

您應該減去頁腳的高度

在我的瀏覽器上它很好...對於#scroller但內容一直在底部。 您使用的是哪個版本/瀏覽器?

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM