Blackberry 固定 Webworks 中的页眉和页脚

发布于 2025-01-02 23:48:41 字数 502 浏览 7 评论 0原文

有没有办法在 Webworks 中为 Blackberry Phones 6.0+ 创建固定页眉和页脚?

我尝试使用 iScroll - 在平板电脑操作系统上工作正常,但在 BlackBerries 上不行,它在浏览器中工作正常,但在“编译”时停止工作。

似乎任何有位置的东西:绝对;会将整个页面缩小。

Header <- absolute
Content <- normal
Footer <- absolute

由于某种原因,整个页面缩小到 40 像素(标题的高度),

html 和 body 的高度均为 100%,内容 div 位于标题之外:

<div id="header"></div>
<div id="content"></div>
<div id="footer"></div>

非常感谢您的帮助!

Is there any way to create a fixed header and footer in Webworks for Blackberry Phones 6.0+?

I tried using iScroll - works fine on Tablet OS but not on BlackBerries, it works fine in the browser but stops workings when "compiled".

It seems anything with position: absolute; will shrink the entire page down.

Header <- absolute
Content <- normal
Footer <- absolute

For some reason the entire page shrinks down to 40ish pixels (the height of the header)

both html and body have height at 100% and content div is outside the header:

<div id="header"></div>
<div id="content"></div>
<div id="footer"></div>

Help would be much appreciated!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

又爬满兰若 2025-01-09 23:48:41

在 BB 6 浏览器中,使用绝对/固定位置修复页眉和页脚是有问题的。当您滚动定位元素时,它们会随着页面一起移动。当您停止根据位置将其滚动回顶部/底部时。我建议使用 javascript 来查找设备的高度和高度。修复它们。

 #header{
  height:50px;
}

#footer{
  height:50px;
}

JS

    function setHeight(){
    width = screen.availWidth;
    height = screen.availHeight;
    $('#content').height(height-100);   
}

In BB 6 browser fixing header and footer with absolute/fixed position is buggy. When you scroll positioned elements move along with page. When you stop scrolling it back to top / bottom as per the position. I would suggest using javascript to find the height of the device & fix them.

 #header{
  height:50px;
}

#footer{
  height:50px;
}

JS

    function setHeight(){
    width = screen.availWidth;
    height = screen.availHeight;
    $('#content').height(height-100);   
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文