问题
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).
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.
Despite the included css, one can drag the whole content to the side and thus display the right div unwillingly.
Any thoughts on that?
Thanks
PS: May I precise that I tried most of commonly proposed answereds to overflow issues
回答1:
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);
来源:https://stackoverflow.com/questions/19292799/phonegap-and-android-overflow-issue