Link pseudo-class (: hover) CSS background image flashing bug
This problem is often encountered during development. Here, we make a record for the emergency.
The link pseudo-class (: hover) CSS background image under IE6 has a flash bug, mainly because IE will request this image again, or the image is not cached.
For example:
CSS Code
A: hover {Background: URL (ImagePath )}
Common solutions:
Add the following IE6 special code at the bottom of the page to cache the CSS background image of IE6 to the local device. In this way, IE6 will no longer request to load the background image to the server during a: hover.
XML/html code
<! -[If IE 6]>
<SCRIPT type = "text/JavaScript">
Document.exe ccommand ("backgroundimagecache", false, true );
</SCRIPT>
<! [Endif]->
Or
XML/html code:
<! -[If IE 6]>
<SCRIPT type = text/JavaScript>
Try {
Document.exe ccommand ("backgroundimagecache", false, true );
}
Catch (ERR ){}
</SCRIPT>
<! [Endif]->