我无法切换 DOCTYPE,有没有办法在 FF 和 IE 中解决这个问题?
我试过了
$(document).height()
, $(window).height()
, 和 $("body").height()
,这是文档类型:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
最佳答案
您可能需要以下 CSS:
html, body
{
height: 100%;
}
关于javascript - 在 HTML 4.0 Transitional jQuery 中,$(document).height() 在 FireFox 和 Chrome 中返回不正确的值,但在 IE 中不会,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11437620/