繁体   English   中英

phonegp应用程序中的android浏览器滚动问题

[英]android browser scrolling issue in phonegp application

在我的phonegap应用程序中,滚动在某些设备(android)中可以正常工作 ,但是在某些设备中, 滚动内容不起作用。

我的页面的简单结构如下:

------------页眉-----------

- - - - - - 内容 - - - - - -

------------页脚-------------

样例代码:

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

<div id="content"> 
This content does not scroll when overflow
</div>

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


Header and footer is fixed size and position ( top and bottom).

当我尝试滚动内容区域时,它将无法在某些android设备中使用。

在此先感谢您的解决方案。

您可以使用iScroll或NiceScroll js插件来平滑滚动内容。

http://cubiq.org/iscroll-4

http://areaaperta.com/nicescroll/

嗨,您可以在CSS中使用“ 溢出滚动”选项,但Android 3.0及更高版本支持“ overflow:scroll”, <3.0不支持 为此,您可以使用iscroll http://cubiq.org/iscroll-4或任何其他插件。

首先,如果要使用html制作应用程序,则必须设置一个可触摸的滚动条。 他们是市场上可用的各种插件。 因此,您可以使用其中任何一个。

但是有一些Android不支持的滚动条。 您必须为此选择正确的一个。 我给您一个链接,您可以在其中找到滚动条。 我用过了 它将像魅力一样工作。

http://areaaperta.com/nicescroll/

您可以尝试将样式属性用于<div>

溢出溢出-对我来说,它的工作正常。

<div style='height: 190px; overflow: auto; overflow-y: scroll !important;'>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM