Pon*_*ger 7 jquery android jqtouch cordova
我使用JQtouch,Jquery和PhoneGap创建了一个应用程序.当您在表单的字段中键入内容时,每次输入字符时,整个页面都会向上或向下滚动.我到处寻找解决方案但找不到解决方案.这里有类似的问题:https://github.com/jquery/jquery-mobile/issues/638 但他的解决方案并没有解决我的问题.
有没有人知道为什么页面会随着文本框中每个添加的字符向上和向下滚动?因为页面很小,所以它会快速上下滚动,使其非常烦人.
小智 6
在所有其他CSS样式之后将以下CSS放在您的文件中:
body {
-webkit-perspective: none;
-webkit-transform-style: flat;
}
body > * {
-webkit-backface-visibility: visible;
-webkit-transform: none;
}
Run Code Online (Sandbox Code Playgroud)
这应该可以解决你的问题(至少它对我有用).
在名为 onload 的 init 函数中尝试一下:
函数preventBehavior(e) { e.preventDefault(); }; document.addEventListener("touchmove", PreventBehavior, false);
更多讨论请访问http://groups.google.com/group/phonegap/browse_thread/thread/739525b7531b6d29/
| 归档时间: |
|
| 查看次数: |
2828 次 |
| 最近记录: |