你能不能对这个Demo采取行动,让我知道如何设置粘性div停留在视口的底部,并且还能够在页面的第二部分上下滚动页面在视口中。以下是This link中的示例。正如你所看到的那样
<div class="floating-bar evtFloatingBar"></div>
位于页面末尾并控制页面的滚动。以下是我试图创建的内容:
<div id="first">Here is the First Part</div>
<div id="scroller">Click Me</div>
<div id="second">Here is the Second Part</div>
<script>
$('#scroller').click(function() {
$('html,body').animate({
scrollTop: $('#second').css('top')
}, 800, function() {
$('html, body').animate({
scrollTop: 0
}, 800);
});
});
</script>
谢谢你的时间