Site not scrolling on mobile devices?

2019-09-05 08:24发布

问题:

Site's built on bootstrap, I'm using skrollr.jsto add a parallax effect to the header images. I think it's this that's not allowing the site to scroll. I've tested on multiple devices and on even more in Chrome's emulation.

I've read around that overflow: hidden can cause problems, and it appears that skrollr is adding those styles to the html tag.

Link - http://goo.gl/YofGx7

回答1:

You said that overflow: hidden can cause problems, so why don't you kill that style by adding the inline css style in your html markup. For example, if the tag who has the style of 'overflow hidden' has the id of #body, then in the html markup you set the style: like

   <div id="body" style="overflow:scrolll;">
   ....
   ....
   ....
   ....
   ....
   </div>

The direct/inline style of "overflow:scroll;" in the tag will remove the style of overflow:hidden; in an external css file.



回答2:

Try

body {
  overflow: scroll !important;
}