Skrollr cutoff on iPad

…衆ロ難τιáo~ 提交于 2019-12-19 11:02:44

问题


I am using Skrollr plugin and it's working fine on desktop. On iPad though, the height of my document is cutoff. I have tried to remove all skrollr data attributes, but the issue persists, I noticed that just by activating the plugin I get this issue.

I tried to enable/disable the forceHeight option but the issue persists. Any idea?

Many thanks


回答1:


I had this issue, too, but I fixed it by adding an empty data-top and data-bottom to the #skrollr-body div. (Though depending on how strict your HTML cleaners are, you may need to add data-top="" or data-bottom="")

<body>
   <div id="skrollr-body" data-top data-bottom>
       Your content here.
   </div>
</body>

I'm still looking into the explanation of why this fix works, but I believe it has something to do with setting keyframes. By making sure your #skrollr-body has keyframes for top and bottom, it ensures both are seen in the viewport.

More details here: https://github.com/Prinzhorn/skrollr/issues/576



来源:https://stackoverflow.com/questions/25608911/skrollr-cutoff-on-ipad

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