Images Flash White in Internet Explorer 9 While Na

2019-06-28 05:00发布

问题:

I am developing a website in XHTML 1.1/CSS 3.0 and I have a problem with Internet Explorer 9. Each time I change pages from "Home" to "Features" various images flash 'white' before filling in. This 'white flash' occurs each time the page is changed. I have seen numerous stack overflow posts discussing such errors but they seem to be for older versions of IE. The site looks fine in Chrome.

Here is what I've tried so far --

  • ran XHTML through validator (it passes).
  • ran CSS Level 3 validator (it passes).
  • tried setting background color to black.
  • tried changing CSS include format to import and back again (per previous stack overflow suggestion)
  • moved from HTML/XHTML Transitional to XHTML Strict
  • commented out images to identify a specific image or div -- seems that most of them do it.
  • tried empty Script tag hack (for flash of uninitialized content bug in IE)
  • tried adding meta tags to change cache settings so browser uses cache.
  • tried various IE browser-specific meta tags suggested for IE6, IE7, IE8 to try to 'fix' the behavior.

Any thoughts on what I can try next?

Thank you!

回答1:

The flashing could be a side effect of having multiple layers of background images, including the shadow layer which stretches to fill the viewport. I'd try disabling those effects and seeing if that helps. Who knows how that might be affecting IE drawing the page...

You might find that putting gradient.png on #innerContent instead of #content makes more sense, and in doing that, you you won't need to use multiple BG images on a single element.