Home  >  Article  >  Web Front-end  >  A BUG solution to IE6 image loading_javascript skills

A BUG solution to IE6 image loading_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:23:261166browse

The code is as follows:

Copy code The code is as follows:



Note: This BUG has been discovered before and is just mentioned again here.

For more detailed instructions, please refer to the following article:
Background images are not cached by default under IE6. Every time the position of the image is changed in CSS, the request will be reinitiated. Use this method to tell IE6 to cache the background image
Solve the problem of jitter during mouse operation when the image is used as the background in IE
Method 1, css (not recommended)
Copy code The code is as follows:

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

Method 2, js
Copy content to clipboard
Copy code Code As follows:

try {
document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}

In fact now Most of the solutions to the problem use CSS background positioning. That is, all the icons on the entire page are placed on one picture. (Take mail 163 as an example)
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn