iOS Safari滚动到顶部不适用于某些页面。为什么? [英] iOS Safari scroll to top does not work on certain pages. Why?

查看:121
本文介绍了iOS Safari滚动到顶部不适用于某些页面。为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

免责声明:该网站已经更新,新版本的设计不再出现此问题。

我建立的新网站我注意到Safari(iOS 5)中有一个奇怪的怪癖。通常,您可以点击Safari顶部的黑条以滚动到任何网页的顶部。在我的新网站上,这适用于主页,但不适用于单个文章页面。

On a new site I built I noticed a weird quirk in Safari (iOS 5). Usually you can tap the black bar on top of Safari to scroll to the top of any webpage. On my new website this works on the homepage, but not on single article pages.

试试吧! versbeton.nl (有效!)与 versbeton.nl/2012/01/vers-vloeibaar/ (不起作用!)

Try it! versbeton.nl (works!) vs. versbeton.nl/2012/01/vers-vloeibaar/ (does not work!)

如何调试这种情况?据我所知,iOS没有Firebug(或类似的调试工具)。

How can I debug such a situation? As far as I know there's no Firebug (or similar debugging tool) for iOS.

推荐答案

-webkit -overflow-scrolling:触摸是问题所在。如果您在CSS中使用 where ,则滚动到顶部的快捷方式将停止工作。这是iOS 5的已知问题,遗憾的是没有解决方法。希望它将在iOS 6中修复。

-webkit-overflow-scrolling:touch is the problem. If you use that anywhere in your CSS, the scroll-to-top shortcut stops working. This is a known problem with iOS 5, there is no workaround unfortunately. Hopefully it will be fixed in iOS 6.

这篇关于iOS Safari滚动到顶部不适用于某些页面。为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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