我使用jquery mobile设计了android phonegap应用程序。我需要显示弹出窗口,我设置了jquery mobile popup的高度。我已经给出了溢出:滚动css和弹出内容在android 4.0中滚动,但它不是在android 2.2中滚动。
这是我的代码
<div align="center">
<a href="#popupBasic" data-rel="popup">Pop Up</a>
</div>
<div data-role="popup" id="popupBasic" data-dismissable="false" data-theme="c" data-overlay-theme="c" >
<p id="popup_content">PhoneGap is a free and open source framework that allows you to create mobile apps using standardized web APIs for the platforms you care about.Easily create apps using the web technologies you know and love: HTML, CSS and JavaScript.From first-timers to long-time veterans, we’ve got your dev needs covered. The developer portal is the place to find guides, documentation and tutorials.This guide describes how to set up your development environment for Cordova and run a sample application.</p>
</div>
CSS:
.ui-popup { 位置:相对; 高度:100像素; 溢出:滚动; }
请引导我。谢谢。
答案 0 :(得分:4)
我在开发android的phonegap应用时遇到了这个问题。基本上,overflow:scroll在android 2.2中不起作用;看到这些错误报告:
http://code.google.com/p/android/issues/detail?id=2118
http://code.google.com/p/android/issues/detail?id=2911
我使用javascript解决方案解决了这个问题:https://github.com/watusi/jquery-mobile-iscrollview
希望这有帮助!