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

查看:16
本文介绍了使用 -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天全站免登陆