jQuery 淡入淡出使 IE7 中的文本没有抗锯齿 [英] jQuery fadeIn leaves text not anti-aliased in IE7

查看:14
本文介绍了jQuery 淡入淡出使 IE7 中的文本没有抗锯齿的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么会这样?有什么解决方法吗?

jQuery:

<前>$(函数(){$('p.quote').fadeIn(3000);});

HTML:

<前><p>有人说:</p><p class="quote">“lorem ipsum&rdquo;</p><p>别人说:</p><p class="quote" style="display: none;">“magna carta&rdquo;</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">&ldquo;lorem ipsum&rdquo;</p>
<p>someone else said:</p>
<p class="quote" style="display: none;">&ldquo;magna carta&rdquo;</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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆