我的网站无法在移动设备上滚动

我的网站无法在移动设备上滚动

问题描述:

我找不到在移动设备上启用网站滚动的方法(在 iOS 8 Safari 和 Chrome 上测试).它在桌面上完美运行

I can't find a way to enable scroll on my website on mobile device (tested on iOS 8 Safari and Chrome). It works perfectly on desktop

我使用了 Safari 开发工具包来删除和测试代码的不同部分,结果只有头部标签和正文标签,只有简单的文本,我的网站仍然没有滚动.所以我的猜测是它是在页面加载时发生的.

I have used the Safari dev kit to remove and test the different parts of the code and ended up with only head tags and body tags with only simple text, and my website was still not scrolling. So my guess is that it is something that occurs on page load.

可以在此处查看我的网站.

将以下几行添加到您的 css 中:

Add Following lines to your css :

overflow: scroll;
-webkit-overflow-scrolling: touch;