Sha*_*eKm 1 css jquery jquery-plugins css-float
我正在寻找某种类型的css(也许是jquery)解决方案,其中div总是保持在屏幕的底部 - 就像这在facebook上进行 - >查看消息 - >个人消息对话."回复"框始终位于底部,当您滚动到顶部以查看先前的消息时,回复框也会向上移动.
谢谢
HTML:
<body>
<div id="footer"></div>
</body>
Run Code Online (Sandbox Code Playgroud)
CSS:
#footer {
position:fixed;
bottom:0;
height:100px;
width:100%;
}
Run Code Online (Sandbox Code Playgroud)
jQuery在加载时滚动到底部:
$(function(){
$("body").animate({scrollTop: $(this).height()}, 1000);
});
Run Code Online (Sandbox Code Playgroud)
http://jsfiddle.net/AlienWebguy/CCpJg/5/