用css Sprites的時候IE6的一個小bug

來源:互聯網
上載者:User

如果在使用 css Sprites 背景圖你沒有指定一次,而是採用 Workaround,而非 Fix

那麼就會出現一個bug :如果IE 的緩衝控製為不緩衝,每次都去伺服器取資源的話,背景圖會閃

這個是 chen yagnjian 提供的方案:

Client-side fix:Tools  >  Internet Options  >  'Settings' under Temporary Internet files  >  Select 'Automatically'  >  OK CSS FIX - Insert in your CSS:html {  filter: expression(document.execCommand("BackgroundImageCache", false, true));} Javascript FIX:<script type="text/javascript">try {document.execCommand('BackgroundImageCache', false, true);}catch(e) {};</script> 

轉載請註明:小賀的博兒/小河的博兒

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.