例如:
CSS代碼
a:hover{background:url(imagepath)} 常用的解決方案:
在頁面底部添加以下IE6專用代碼,讓IE6緩存CSS背景圖片至本地,這樣a:hover時IE6就不會再重新向服務器請求加載背景圖片了。
XML/HTML代碼
<!–[if IE 6]>
<script type=”text/javascript”>
document.execCommand(“BackgroundImageCache”, false, true);
</script>
<![endif]–>
或者
XML/HTML代碼
<!–[if IE 6]>
<script type=text/javascript>
try {
document.execCommand(“BackgroundImageCache”, false, true);
} catch(err) {}
</script>
<![endif]–>
新聞熱點
疑難解答