且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何获得一致的javascript window.outerHeight跨浏览器?

更新时间:2023-02-01 23:26:36

body.offsetHeight 。

for IE8 you could use document.body.offsetHeight.

但我建议只使用CSS:

but I would suggest to use only CSS:

<div id="footer" style="position: fixed; bottom: 0;"></div>

(例如: http://jsfiddle.net/5h8zj/