[英]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.