在Safari 7上使用position:fixed元素滚动时,部分页面不可见 [英] Parts of page are invisible when scrolling on Safari 7 with position:fixed elements

查看:745
本文介绍了在Safari 7上使用position:fixed元素滚动时,部分页面不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Mac OS和iOS上有一个很大的bug,很难找到任何东西,但很容易修复。

There's a pretty big bug in Safari 7 on both Mac and iOS that's hard to find anything on, but is pretty easy to fix.

在某些情况下,当使用position:fixed,Safari 7无法在滚动时绘制部分页面。您可以通过点击箭头 http://ruelculture.com/glitchy.html 查看此信息,稍等片刻,然后尝试向上滚动。

In some situations when using position:fixed, Safari 7 fails to draw part of the page when scrolling. This can be seen at http://ruelculture.com/glitchy.html by clicking on the arrow, waiting a bit and trying to scroll back up.

推荐答案

要解决这个问题,通过添加以下CSS hack来强制硬件加速对消失的元素:

To fix this, force hardware acceleration on the disappearing element by adding the following CSS hack:

-webkit-transform: translate3d(0, 0, 0);

http://ruelculture.com/ 。就是这样!

这篇关于在Safari 7上使用position:fixed元素滚动时,部分页面不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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