在HTML里滚动的内容没有在Android模拟器或手机滚动 [英] Scrollable content inside an HTML does not scroll in android emulator or phone

查看:112
本文介绍了在HTML里滚动的内容没有在Android模拟器或手机滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个显示一些HTML内容的WebView。在我的HTML我已经把溢出-Y:滚动一个特定的div。现在,当项目数超过在div股利不滚动的面积。任何人有任何想法,请建议。

I have a WebView that displays some HTML content. Inside my HTML I have placed overflow-y: scroll for a particular div. Now when the number of items exceed the area of the div the div does not scroll. Anyone having any idea, please suggest.

溢出-Y:汽车也没有帮助

overflow-y: auto doesn't help either.

推荐答案

Android的3.0和更高版本有溢出支持:,在< 3.0又是另一回事。你可能有与像 iScroll polyfills一定的成功,但是这并付出了代价。这是很难实现的网站上有复杂的布局,你需要调用的方法,每次在您的网站的内容发生更改。内存使用也是一个问题:在已经动力不足的设备的性能可能会滞后,因为这类polyfills的

Android 3.0 and higher have support for overflow:, on < 3.0 it's another story. You might have some success with polyfills like iScroll, however that does come at a cost. It's difficult to implement on sites with complex layouts, and you need to a call a method everytime the content on your site changes. Memory use is also an issue: on already underpowered devices performance may lag because of these kinds of polyfills.

下面是的可滚动DIV对手机比较

Here is a comparison of Scrollable DIV on mobile phones

我认为这将有助于你找到最佳的解决方案。我建议使用iScroll或 touchScroll 了解您的问题。

I think this will help you to find the best solution. I recommend to use iScroll OR touchScroll for your issue.

这篇关于在HTML里滚动的内容没有在Android模拟器或手机滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆