简体   繁体   English

移动网站滚动问题

[英]mobile site Scroll issues

Im building a website www.nutcraft.co.uk/shop.html and it is behaving ok in normal browsers, however when viewed in mobile browsers it will not scroll and the content is locked at the top of the screen. 我正在建立一个网站www.nutcraft.co.uk/shop.html,在正常的浏览器中运行正常,但是在移动浏览器中查看时,它不会滚动并且内容被锁定在屏幕顶部。

Ive read around trying to figure this fix out but I am at a loss. 我已经阅读了很多,试图找出解决办法,但我很茫然。 ( know I have to clean up the div tags etc, but Im more of a designer than a coder and my head is spinning)!!! (知道我必须清理div标签等,但是我比编码员更多的是设计师,而我的头在旋转)!

Any help would be greatly appreciated. 任何帮助将不胜感激。

You have an inline style with body overflow:hidden only in your mobile view. 您的内联样式具有主体溢出:仅在移动视图中隐藏。 This is added by the grid system's javascript (you are using something called 5grid). 这是由网格系统的javascript添加的(您使用的是5grid)。 Either there is a problem with the grid system javascript, or you are missing some component. 网格系统javascript有问题,或者缺少某些组件。 I am not familiar with 5grid, so I am not able to say whether their grid system is robust or not. 我对5grid不熟悉,所以我不能说他们的网格系统是否健壮。

I tried to find out more and didnt find anything online about it. 我试图找到更多信息,却没有在线找到任何相关信息。 So without the documentation, there is nothing I can do to help except guess that the grid system wasn't tested cross mobile maybe? 因此,没有文档,除了猜测网格系统可能没有经过交叉移动测试之外,我无能为力吗? It seems to use a lot of touch based javascript. 似乎使用了大量基于触摸的JavaScript。

If it were me I would have preferred media queries over javascript solution when it comes to making a site responsive. 如果是我,那么在使网站响应时,我会首选媒体查询而不是JavaScript解决方案。

If you still want to use the grid system, you can add a css style with: 如果仍要使用网格系统,则可以使用以下命令添加css样式:

overflow:visible !important;

to your body tag. 到你的身体标签。 That should solve the problem hopefully. 那应该有望解决问题。 But please check if that affects the site experience in the mobile devices in which it already works. 但是请检查是否影响已经运行的移动设备中的网站体验。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM