iPad Overlay并未完全覆盖屏幕

时间:2011-08-29 08:02:12

标签: iphone html css ipad overlay

在叠加DIV打开时,我使用模态div作为叠加来禁用背景页面。这是代码;

#TB_overlay {
    height: 100%;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

现在这适用于桌面浏览器,但在iPad上,覆盖窗口仅覆盖屏幕高度,而不是整个页面。我该如何解决这个问题?

我知道有一些已知的位置:修复问题并给出固定的px高度值可以解决这个问题吗?

但如果此问题还有其他解决方法,请告诉我。

2 个答案:

答案 0 :(得分:0)

我在我的网站上通过使用jQuery计算整个页面的大小然后相应地设置叠加高度来解决这个问题。

答案 1 :(得分:-1)

iPad支持方便:

<link rel=”stylesheet” media=”all and (orientation:portrait)” href=”css/portrait.css”>

和/或

 <link rel=”stylesheet” media=”all and (orientation:landscape)” href=”css/landscape.css”>

我建议在ipad.css文件中使用min-width / min-height。

相关问题