使用-webkit-overflow-scrolling在iOS 5中滚动的问题 [英] Issue with scrolling in iOS 5 using -webkit-overflow-scrolling

查看:147
本文介绍了使用-webkit-overflow-scrolling在iOS 5中滚动的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个固定高度 div 的HTML页面,它应该是可滚动的(只能垂直)。在iOS 5中,这可以通过以下方式实现:

I have an HTML page with a fixed-height div which should be scrollable (only vertically). In iOS 5 this can be achieved using:

overflow-y: auto;
-webkit-overflow-scrolling: touch;

div 包含一个包含大约10个项目的无序列表。

The div contains an unordered list with about 10 items.

滚动有效,但有时只有在我对角线或水平滑动手指而不是垂直滑动时才会滚动。

The scrolling works, but sometimes it scrolls only if I swipe my finger diagonally or even horizontally and not vertically as it should be.

我想知道是否有人遇到过这个问题。我不想认为这是iOS5中的一个错误,但是我无法弄清楚我做错了什么,因为大部分时间它工作正常。

I'm wondering if anyone has encountered this issue. I don't want to think that it is a bug in iOS5, but I can't figure out what I'm doing wrong because most of the time it works fine.

推荐答案

我有完全相同的问题。问题原来是由我的网站用于跟踪历史记录更改和加载脚本的两个零大小的iframe引起的。删除这些修复了问题。我向苹果公司提交了一个错误,等待他们回复。

I had exactly the same issue. The problem turned out to be caused by two zero size iframes my site used to track history changes and load scripts. Removing these fixed the issue. I filed a bug with apple, waiting to hear back from them.

检查你的页面上是否有任何iframe,这可能是他们的原因。

Check to see if you have any iframes on your page they could be the cause.

这篇关于使用-webkit-overflow-scrolling在iOS 5中滚动的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆