我正在使用此代码:
$(window).scroll(function () {
if (($(document).height() - $(window).scrollTop()) <= 500){
$("#content-5").css({
position: 'fixed',
top: 'auto',
bottom: '300px'
});
} else if ($(window).scrollTop() >= 30) {
$("#content-5").css({
position: 'fixed',
top: '30px',
bottom: 'auto'
});
}else{
$("#content-5").css({
position: 'absolute',
top: '30px',
bottom: 'auto'
});
}
});
这是演示
http://jsfiddle.net/Ym2Ga/75/
它的工作正常,但我不知道该怎么做,浮动的浮华停在页脚。有人可以帮忙吗?
最佳答案
我已经更新了您的提琴手。...将您的CSS的第一块更改为...$("#content-5").css({ position: 'fixed', top: '0px', bottom: 'auto' });
fiiddle
关于jquery - 在页脚Jquery处停止 float ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24980340/