jQuery IE Cleartype glitch on fadeout!

和自甴很熟 提交于 2019-12-25 02:03:42

问题


Please do not point me to more articles about this issue I think I've read them all... I have a div that has some text in it and I just wanted to fade it out in jQuery:

$(document).ready(function(){
  $('#dHeaderMessage').fadeOut(12000, function() { 
    });  
});

This fades out correctly but the text inside of this div looks awful when the page first loads up (IE8). So I googled it and it mentioned its some ClearType font issue with IE. The workaround was to remove a "filter" in javascript like so:

document.getElementById('dHeaderMessage').style.removeAttribute("filter");

But this did not seem to make any change...so I tried doing it right within the jQuery:

$('#dHeaderMain').fadeOut(12000, function() { 
        this.style.removeAttribute("filter");
    }); 

Still the same issue the text looks blurry... How can I solve this?


回答1:


Here is what you can do:

$('#dHeaderMessage').delay(20000).fadeOut('slow');




回答2:


I had this problem, I found it easy to fix. If you can, give the div a background color. That fixed it for me.



来源:https://stackoverflow.com/questions/6073986/jquery-ie-cleartype-glitch-on-fadeout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!