读书人

处理IE6上默认不缓存背景图片的有关问

发布时间: 2012-08-22 09:50:35 作者: rapoo

处理IE6下默认不缓存背景图片的问题

处理IE6下默认不缓存背景图片的问题IE6下默认不缓存背景图片,CSS里每次更改图片的位置时都会重新发起请求,用这个方法告诉IE6缓存背景图片 解决IE下图片作为背景时,有鼠标操作时的抖动问题方法一、css(推荐使用)代码:     div{*zoom:1;}    html {            zoom:expression(function(ele) {            ele.style.zoom = "1";            document.execCommand("BackgroundImageCache", false, true);            }            (this));           }方法二、js代码:try {  document.execCommand('BackgroundImageCache', false, true);} catch(e) {}      方法三、css expression (不推荐)html {  filter: expression(document.execCommand("BackgroundImageCache", false, true));}      其实现在解决问题的做法大多采用css 背景的定位。即整个页面做所有图标做在一张图上。


http://www.cnblogs.com/fighting_cp/archive/2010/08/30/1812538.html

读书人网 >Web前端

热点推荐