开发者

IE6 reloads background image on position change? [duplicate]

This question already has an answer here: Closed 11 years ago.

Possible Duplicate:

Jquery IE6 hover problems, keeps loading background image开发者_如何学C.

Hello I am trying to solve this problem: I have this div with a background image. The background image position change on mouse move or some other evets. The problem is that on position change only IE6 seem to reload image causing a empty image for some seconds.

<div style="position: absolute; top: 0px; left: 0px; background: url("img/one.jpg") repeat scroll -1380px -252px transparent;"></div>

How can I avoid this bug in IE6? Is there a trick?


CSS

html {
  filter: expression(document.execCommand("BackgroundImageCache", false, true));
}

Source.

You may want to place this in a conditional comment to target IE6 exclusively.


Try this CSS solution to fix the IE6 background image bug:

html {
  filter:expression(
    document.execCommand("BackgroundImageCache", false, true)
  );
}

(from this 2006 article)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜