我正在使用 Intel App Framework 和 XDK 开发一个应用程序,但在模拟器之外滚动以正常工作时遇到了很多麻烦。我还没有 Apple 开发者许可证,所以我只能使用 App Preview 在 iOS 上进行测试
第一个问题是整页面板。在 Android 版本和 Android/iOS 模拟器上,它们滚动良好,但在 iOS 上根本不滚动。面板的 HTML:
<div class="upage panel" id="uib_page_info" data-header="af-header-info" data-footer="none">
<div class="upage-outer">
<header class="container-group inner-element uib_w_2" data-uib="app_framework/header" data-ver="0" id="af-header-info">
<a id="backButton" href="javascript:;" class="button" >Back</a>
<h1>Info</h1>
<div class="widget-container wrapping-col single-centered"></div>
<div class="widget-container content-area horiz-area wrapping-col left"></div>
<div class="widget-container content-area horiz-area wrapping-col right"></div>
</header>
<div id="uib_page_infosub" class="upage-content ">
<div style="width:100%; ">
<!-- text content here, long enough to need scrolling -->
</div>
</div>
</div>
第二个问题是 div 仅占据视口的一部分,而页面的其余部分不滚动。在模拟器中它运行良好,我让它在 Android 上滚动一次,但此后即使在同一个版本上也无法滚动。在模拟器中,滚动条出现在侧面,鼠标滚轮起作用。面板的 HTML:
<div class="upage panel" id="uib_page_events" data-header="af-header-events" data-footer="none" data-load="DoCalendarLoad">
<div class="upage-outer" style="height:100%">
<header class="container-group inner-element uib_w_3" data-uib="app_framework/header" data-ver="0" id="af-header-events">
<a id="backButton" href="javascript:;" class="button" >Back</a>
<h1>Event Calendar</h1>
<div class="widget-container wrapping-col single-centered"></div>
<div class="widget-container content-area horiz-area wrapping-col left"></div>
<div class="widget-container content-area horiz-area wrapping-col right"></div>
</header>
<div id="uib_page_eventssub" class="upage-content " style="width:100%; height:100%; background:#FFFF00">
<div id="eventsContent" style="width:100%; position:absolute; top:0px;">
<input type="text" id="example" style="position:absolute;top:-40px;height:40px;width:100%;" gldp-id="calendarDiv"/>
<div class="ratioCalendar" id="ratioOuter" style=" position:absolute; top:0px; width:100%; background:#FF0000">
<div class="ratio_content" id="ratioInner" style="background:#00FF00" gldp-el="calendarDiv"></div>
</div>
<div class="ac-container" id="listDiv" style="position:absolute; width:100%; bottom:0px; background:#EFE7D0; margin:0px; overflow-y: scroll; overflow-x: hidden" scrolling="yes" >
<!-- several of the following, formatted as http://cssdeck.com/labs/5p3sqfwi -->
<div class="ac-container">
<div>
<input id="ac-2" name="accordion-1" type="checkbox" />
<label for="ac-2">
<span class="event_date">05.07.2013</span> Title
</label>
<article>
<!-- content -->
</article>
</div>
</div>
</div>
</div>
</div>
</div>
在这两种情况下我做错了什么?