Phonegap和Android溢出问题 [英] Phonegap and Android overflow issue

查看:79
本文介绍了Phonegap和Android溢出问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当div溢出时,Android webview似乎根本不关心overflow:hidden css属性.我使用了很棒的 github ).

It seems that Android webview does not care at all about overflow:hidden css property when having overflowing divs. I took the code of a great tutorial on GPU transitions with HTML/CSS and add it to a simple phonegap project (github).

此代码定义了两个100%宽度的div,其中一个溢出了右侧的屏幕.单击链接会进行GPU加速过渡,从而移动div.

This code defines two 100% width divs where one overflows the screen on the right side. Clicking on links makes an GPU acelerated transition that moves the divs.

尽管包含的CSS ,您可以将整个内容拖到一边,从而不情愿地显示右侧的div.

Despite the included css, one can drag the whole content to the side and thus display the right div unwillingly.

对此有何想法?

谢谢

PS:我想请问,我尝试了大多数常见的答案来解决溢出问题

PS: May I precise that I tried most of commonly proposed answereds to overflow issues

推荐答案

好的,我想出了办法,这虽然不漂亮,但具有真正起作用的优点:

Okay so I figured out how to do it, this is not pretty but has the advantage of really working:

document.addEventListener('touchmove', function(e){ e.preventDefault(); }, false);

这篇关于Phonegap和Android溢出问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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