【发布时间】:2015-07-24 17:59:02
【问题描述】:
我最近正在使用在 iOS 设备上运行的温泉 UI 系统开发 phonegap。 我有一个问题,我注意到如果您使用“”,其中包含的任何内容在 iPad 或 iPhone 中运行时都无法按下。这是我的代码如下:
<ons-template id="test.html" style="display:none;">
<ons-page>
<ons-toolbar style="background-color:#FF9500;">
<div class="left"><ons-back-button>Back</ons-back-button></div>
<div class="center">Main AK</div>
</ons-toolbar>
<div class="center">
<ons-scroller>
<ons-button modifier="food_folder" onclick="">Type A</ons-button>
<button class="button button--cta" style=" width:100px; z-index:1000;" >Test</button> -->
</ons-scroller>
</div>
<ons-tabbar>
<ons-button icon="ion-ios-checkmark" modifier="navi_button" onclick="">SAVE</ons-button>
<ons-button icon="ion-ios-checkmark" modifier="chk_button" onclick="">
<div><span class="notification">1</span></div>
Latte
</ons-button>
</ons-tabbar>
</ons-page>
</ons-template>
当我在浏览器中运行时工作正常。就在我部署到 iOS 设备时,ons-scroller 中的按钮无法按下。它似乎被顶部的另一层覆盖。如果我删除了 ons-scroller,那么按钮工作正常。原因是我可能有很多按钮适合该区域,我需要它可以滚动,特别是在 iPhone 中运行。
有人遇到同样的问题吗?如何解决这个问题呢?谢谢
【问题讨论】:
-
我找到了解决问题的方法:但不确定这是否是标准方法:首先:我在
之后重新定位 然后只启动 ,第二个:我将更改 的 css 删除 z-index:2..然后它工作正常。如果有人有不同的方法来解决这个问题,请在此处更新。谢谢
标签: javascript ios css cordova onsen-ui