Jan Mészáros reflections on technology and society

12Mar/1011

IE8 CSS background flickering

Combination of white content on a black background causes an uncomfortable flickering or flashing in Internet Explorer 8. I resolved this problem adding following lines of code into head of XHTML page:

  1. <meta http-equiv="Page-Enter" content="blendTrans(Duration=.01)" />
  2. <meta http-equiv="Page-Exit" content="blendTrans(Duration=.01)" />
  3.  
  4. <script language="javascript" type="text/javascript">
  5.     try
  6.     {
  7.         document.execCommand("BackgroundImageCache", false, true);
  8.     }
  9.     catch(err) {}
  10. </script>
Tagged as: , 11 Comments