IE中固定定位元素闪烁,如何解决? [英] fixed positioned element flicker in IE only, how to solve?

查看:339
本文介绍了IE中固定定位元素闪烁,如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

IE11中的奇怪问题,当使用鼠标滚轮或光标键时,以下项目的固定背景会闪烁。这肯定是一个错误。

Weird problem in IE11, the fixed background of the following project flickers when using mousewheel or cursor keys only. This is a bug, for sure.

网站: http://gerbrandy.zitemedia.nl:88/

我使用脚本来调整背景比例,但这不是问题,因为滚动时resize事件不会触发,所以它不是问题所在脚本。它与固定定位元素有关。在所有其他浏览器中,此脚本可以使用好几年。

I use a script to resize the background proportional but this is not the problem because the resize event does not fire when scrolling, so it is not a problem of the script. It has something to do with a fixed positioned element. This script works okay for several years in all other browsers.

我不知道如何解决这个问题。尝试了几件事,但不知道如何禁用javascript例如但不应该是这种情况。我在Windows 8.1上使用IE11。

I have no idea how to fix this. Tried several things, but don't know how to disable javascript for example but should not be the case. I'm using IE11 on Windows 8.1.

有人对此有相同的经验,你知道如何解决这个问题吗?

Does somebody has some same experience with this and do you know how to work around this problem?

推荐答案

滚动时有三件事可能导致IE 11闪烁/波动/延迟固定位置元素:

Three things can cause IE 11 flickering/choppy/delay for fixed position element while scrolling:


  1. 如果您有overflow:auto;在父容器元素上,将其删除。

  1. If you have an "overflow: auto;" on the parent container element, remove it.

删除background-attachment:fixed;来自固定位置元素。

Remove background-attachment:fixed; from the fixed position element.

从固定位置元素移除border-radius(仅限移动IE)。

Remove border-radius from the fixed position element (mobile IE only).

这篇关于IE中固定定位元素闪烁,如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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