为什么jQuery脉动效果会在IE中留下锯齿状文本? [英] Why does the jQuery pulsate effect leave jagged text behind in IE?

查看:113
本文介绍了为什么jQuery脉动效果会在IE中留下锯齿状文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用jQuery UI的脉动效果时,我发现脉动会留下锯齿状的文字...经过一些搜索后,它似乎是一个IE错误......我认为它可能与不透明度有关,但是我不确定。

I found out that pulsate leaves jagged text behind when I use the pulsate effect of jQuery UI... after some searching it appears that it's an IE bug... i think it may have something to do with the opacity, but i am unsure.

我尝试了以下但不起作用:

I tried the following but it doesn't work:

  $(detail).effect("pulsate", { times: 1 }, 200, function(){
     $(this).removeAttr('opacity');
  });

有没有人知道一项解决方法?我在这里搜索并发现类似的问题 fadein fadeout ...列出的解决方案是删除过滤器属性。但我也尝试了这个,它似乎没有用。如果我删除样式属性然后它可以工作,但随后我放弃了我的定位: - )

Does anyone know of a work around? I searched here and found a similar problem with fadein and fadeout... the solution listed was to remove the filter attribute. But I tried this also and it didn't seem to work. If I remove the style attribute then it works, but then I loose my positioning :-)

任何人都有这个问题吗?

Anyone had this issue?

对于脉动和fadein和fadeout等同样的修复是什么?我必须承认我似乎没有得到fadein和fadeout的问题。

And is it the same fix for pulsate as with fadein and fadeout, etc...? I must admit I don't seem to get the issue with fadein and fadeout.

Pulsate是我的问题,但它在Firefox中完美运行。

Pulsate is my problem, but it works perfectly in Firefox.

推荐答案

这是Internet Explorer的一个众所周知的问题。归结为:IE对元素的不透明度没有任何内置支持。 jQuery试图通过使用过滤器来掩盖这一点,过滤器是一种特定于IE的功能,其中一个元素被渲染成一个屏幕外的图像,然后该图像由一些插件代码处理,最终的图像被插回到页面并在(大致)与原始元素相同的位置渲染。它......主要是有效的。但是当绘制到该图像上时,文本不会消除锯齿。

This is a well-known issue with Internet Explorer. It boils down to this: IE does not really have any built-in support for opacity on elements. jQuery tries to mask this by using "filters", an IE-specific feature wherein an element is rendered into an off-screen image and then that image is processed by a bit of plug-in code, with the final image inserted back into the page and rendered in (roughly) the same place as the original element. It... mostly works. But text is not anti-aliased when drawn onto that image.

根据您使用的字体,结果可能只是丑陋到完全不可读。

Depending on which fonts you use, the results can range from merely ugly, to completely unreadable.


  • IE is losing ClearType
  • JQuery toggle function rendering weird text in IE (losing ClearType?)

这篇关于为什么jQuery脉动效果会在IE中留下锯齿状文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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