如何在移动响应网站上修复粘滞滚动? [英] How do I fix a sticky scroll on a mobile responsive website?

查看:53
本文介绍了如何在移动响应网站上修复粘滞滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个移动响应型网站. 我注意到,当使用iPhone滚动页面时,滚动是粘滞且不平滑的,而在android手机上是可以的.

I am building a mobile responsive website. I noticed that when scrolling the page using an iPhone, the scroll is sticky and not smooth, while on android mobiles it's ok.

此粘滞滚动的原因是什么?我什至在浏览器中都看不到它!请看看我在JSfiddle上的代码.图像将不会加载,但是无论如何您都不需要它们(可以看到它们的边框).我建议您使用320px的宽度查看页面,以便所有图标都井井有条.

What can be the cause of this sticky scroll? I cant even see it on my browser! Please take a look at my code on JSfiddle. The images won't load but you don't need them anyway (you can see their borders). I recommend you to use 320px width to view the page so the icons are all organized.

推荐答案

因此您可以将以下行添加到您的身体或主div中:-webkit-overflow-scrolling: touch; 搞定了.

So there is this line you can add to your body or the main div: -webkit-overflow-scrolling: touch; Made the trick.

这篇关于如何在移动响应网站上修复粘滞滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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