固定位置在IOS上延迟 [英] Fixed position delayed on IOS

查看:150
本文介绍了固定位置在IOS上延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iPad上测试了我的网站上的贴子后,发现它无法正常工作,我觉得它是iOS的问题 https://github.com/twbs/bootstrap/issues/11560 目前没有简单的解决方案。

After I tested affix on my website on iPad I find out that it is not working properly and I goggled that it is problem with iOS https://github.com/twbs/bootstrap/issues/11560 and currently there is no easy solution for that.


iOS在滚动时计算固定位置时遇到问题。
基本上你没有得到更新的固定头寸,直到你停止滚动后稍微延迟

iOS just has problems with calculating fixed position as you scroll. Basically you don't get an updated fixed position until a slight delay after you stop scrolling

是我可以做些什么让它起作用,可能是某些人已经完成了一些工作?

Is there anything I can do to make it work, may be some one already done some work around?

推荐答案

这有时候会做对我而言。

This, sometimes, made the trick for me.

    .youraffixelement {
       -webkit-transform: translate3d(0, 0, 0);
       transform: translate3d(0, 0, 0);
    }

它可以在iOs设备上启用硬件加速,并且可以更快地计算滚动位置。

It enables hardware acceleration on iOs devices, and the scroll position is calculated faster.

这篇关于固定位置在IOS上延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆