Dec 7

ie6下面,用设置图片背景的方法来做按钮,鼠标hover会闪烁的解决办法

Javascript

 <script type="text/javascript">try{document.execCommand("BackgroundImageCache", false, true);}catch(e){};</script>

只要在body底部加入上面的js代码就可以了
原因是因为ie6对图片缓存的一个bug导致的,他会去下载背景图片,所以出现鼠标ico变化为漏斗,导致闪烁


tags:

to "ie6下面,用设置图片背景的方法来做按钮,鼠标hover会闪烁的解决办法"

Leave a Reply