问题描述
我正在使用Skrollr插件,并且在桌面上运行良好.但是在iPad上,我的文档的高度已截止.我试图删除所有skrollr数据属性,但是问题仍然存在,我注意到仅通过激活插件就可以解决此问题.
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.
我尝试启用/禁用forceHeight选项,但问题仍然存在.有什么主意吗?
I tried to enable/disable the forceHeight option but the issue persists. Any idea?
非常感谢
推荐答案
我也遇到了这个问题,但是我通过添加一个空的 data-top 和 data-bottom 到#skrollr-body div.(尽管取决于HTML清理程序的严格程度,您可能需要添加 data-top =" 或 data-bottom =" ))
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>
我仍在寻找有关此修复程序为何起作用的解释,但我认为它与设置关键帧有关.通过确保您的#skrollr-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.
此处有更多详细信息: https://github.com/Prinzhorn/skrollr/issues/576
More details here: https://github.com/Prinzhorn/skrollr/issues/576
这篇关于iPad上的Skrollr截止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!