由于某种原因文档高度和窗口高度返回相同的值,因此当从文档高度减去窗口时它返回0.任何人都知道为什么会发生这种情况?
console.log($(window).height()); console.log($(document).height());
以上都返回文档高度
javascript jquery height document window
document ×1
height ×1
javascript ×1
jquery ×1
window ×1