使用scrollTop()时如何加长滚动?(How to lengthen scroll when using scrollTop()?)
我目前在我的网站上使用scrollTop()方法。 它在我的屏幕上工作正常但我意识到当主页在更大的屏幕上时,滚动条不会向下滚动。 有没有办法来解决这个问题?
I'm currently using a scrollTop() method in my website. It works fine on my screen but I realized that when the homepage is on a bigger screen, the scrollbar will not scroll down. Is there a way to fix this?
最满意答案
enter code here无需编辑滚动功能,您只需确保您的身高。 它至少应该是50px>你的窗口高度。 你的$(文件).ready里面加上这个:
$("body").css("height", window.outerHeight + 50 + "px")IE:
$(document).ready(function(){ $('[data-toggle="tooltip"]').tooltip(); $("body").css("height", window.outerHeight + 50 + "px") });enter code hereWithout editing your scroll function you only need to ensure your body height. It should be at least 50px > your window Height. Inside of your $(document).ready add this:
$("body").css("height", window.outerHeight + 50 + "px")IE:
$(document).ready(function(){ $('[data-toggle="tooltip"]').tooltip(); $("body").css("height", window.outerHeight + 50 + "px") });更多推荐
发布评论