简体   繁体   English

带Cordova垂直滚动的Framework7在iOS上不起作用

[英]Framework7 with Cordova Vertical Scrolling Not Working on iOS

I am using Framework7 for the first time in a Cordova iOS application and I really like the look of the UI but I have run into an issue where the page will not scroll vertically that I can not figure out. 我是第一次在Cordova iOS应用程序中使用Framework7,我真的很喜欢UI的外观,但是遇到了一个问题,即页面无法垂直滚动,我无法弄清楚。 I have attempted to debug the code by replacing 'overflow:hidden' in places with 'overflow:auto' but that does not seem to resolve the issue. 我试图通过将“ overflow:hidden”替换为“ overflow:auto”来调试代码,但这似乎无法解决问题。

Has anyone else run into this before? 有人遇到过吗? Any help wuold be greatly appreciated as I am really stumped on this one. 任何帮助wuold都将不胜感激,因为我对此感到非常困惑。

EDIT: I think I have narrowed down the issue to the overflow:hidden CSS attribute on the .view and .pages classes. 编辑:我认为我已将问题范围缩小到.view和.pages类上的overflow:hidden CSS属性。 If I remove that attribute the page scrolls, but now the header and footer are not attached to the top and bottom of the app. 如果删除该属性,页面将滚动,但现在页眉和页脚未附加到应用程序的顶部和底部。

I was able to figure out that the issue was caused by missing the page-content div. 我能够弄清楚问题是由缺少页面内容div引起的。 I added this div just after the data-page="index and it started to scroll. 我在data-page =“ index之后添加了该div,它开始滚动。

Example: 例:

<div class="pages navbar-through toolbar-through">
    <div data-page="index" class="page">   /* this is what I was missing */
        <div class="page-content">
            /* content here */
        </div>
    </div>
</div>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM