我有一個棘手的頁腳這是目前關閉屏幕:粘頁腳開始關閉屏幕
<div id="footer"> <!-- Your footer here --> </div>
$(window).bind("load", function() {
var footer = $("#footer");
var pos = footer.position();
var height = $(window).height();
height = height - pos.top;
height = height - footer.height();
if (height > 0) {
footer.css({
'margin-top': height + 'px'
});
}
});
在頁腳視後開始的那一刻,所以你必須向下滾動才能看到它。我怎樣才能將它拉起來,使它位於視口內?
您是否有興趣在[純CSS解決方案(https://css-tricks.com/couple-takes-sticky-footer/)呢? – Blazemonger