Why is skrollr preventing scrolling on ipad?

让人想犯罪 __ 提交于 2019-12-05 01:25:22

You just naively added an empty #skrollr-body element. The documentation says

Starting with skrollr 0.6.0 there's just one thing you need to do: Include an element on your page with the id skrollr-body. That's the element we move in order to fake scrolling.

If that's the element we move for fake scrolling, then all your elements need to be inside of it (unless they're fixed positioned).

The only case were you don't need a #skrollr-body is when using position:fixed exlusively. In fact the skrollr website doesn't include a #skrollr-body element. If you need both fixed and non-fixed (i.e. static) elements, put the static ones inside the #skrollr-body element.

https://github.com/Prinzhorn/skrollr#what-you-need-in-order-to-support-mobile-browsers

So in other words, simply add a <div id="skrollr-body"> tag right after the opening <body> tag, and close this division by adding a </div> right before the </body> tag.

adding a div wrapper with skrollr-body id did absolutely nothing for, scroll just doesn't work on mobile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!