jQuery 淡入淡出使 IE7 中的文本没有抗锯齿 [英] jQuery fadeIn leaves text not anti-aliased in IE7
问题描述
为什么会这样?有什么解决方法吗?
jQuery:
<前>$(函数(){$('p.quote').fadeIn(3000);});HTML:
<前><p>有人说:</p><p class="quote">“lorem ipsum”</p><p>别人说:</p><p class="quote" style="display: none;">“magna carta”</p>IE 和淡入/淡出功能及其对文本元素的影响存在一个已知错误.在此处查看信息:
http://blog.bmn.name/2008/03/jquery-fadeinfadeout-ie-cleartype-glitch/
看起来我的原始链接已经失效了.更新了与评论不同的解决方案:
http://malsup.com/jquery/cycle/cleartype.html
解决方法是在fadeIn() 完成后在回调函数中移除元素的'filter' 属性.
Why does this happen? Any workarounds?
jQuery:
$(function() { $('p.quote').fadeIn(3000); });
HTML:
<p>someone said:</p> <p class="quote">“lorem ipsum”</p> <p>someone else said:</p> <p class="quote" style="display: none;">“magna carta”</p>
There is a known bug with IE and the fadeIn/fadeOut functions and their effect on text elements. Check out the info here:
http://blog.bmn.name/2008/03/jquery-fadeinfadeout-ie-cleartype-glitch/
Looks like my original link has since gone dead. Updated with a different solution from the comments:
http://malsup.com/jquery/cycle/cleartype.html
The workaround is to remove the 'filter' property of the element in a callback function after fadeIn() has finished.
这篇关于jQuery 淡入淡出使 IE7 中的文本没有抗锯齿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!