jQuery fadeIn/fadeOut IE cleartype 故障如何修复过渡

发布于 2024-10-03 16:28:55 字数 535 浏览 0 评论 0原文

好吧,这是 IE 和 jQuery 的一个众所周知的错误:

IE 正在丢失 ClearType

我是什么询问:在应用“修复”之前,是否可以以某种方式消除丑陋的过渡效果。在 IE 中测试:

http://www.kevinleary.net/wp -samples/ie-fade-problems.php

虽然它是一个更糟糕问题的解决方案,但是否可以修复该过渡和“不清楚类型”内容的闪烁?

这不会给我带来太大麻烦,但它是我在 jquery (superfish) 中的主网站菜单 - 这些转换几乎是可见的......

编辑:只有一件事需要注意 - 这也会发生在你的浏览器上吗?也许是IE设置里的东西?

Well, this is a well known bug with IE and jQuery:

IE is losing ClearType

What I am asking: is it possible to somehow remove that ugly transition effect, before the "fix" is applied. Test this in IE:

http://www.kevinleary.net/wp-samples/ie-fade-problems.php

Although it is a solution to a worse problem, is the possible to fix that tranition and the flash of "un-clear-type" content?

It wouldn't trouble me that much, but it is for my main website menu in jquery (superfish) - those transitions are pretty much visible...

Edit: just one thing to notice - does this happen on your browsers too? Maybe it is something in the IE settings?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

长伴 2024-10-10 16:28:55

当内容发生淡入淡出时,无法修复 ClearType 变得丑陋的问题。这只是 IE 团队在如何实现不透明度过滤器(Direct X,它在 IE 中实现的方式不支持 ClearType)方面做出的一个(IMO)错误决定。

唯一有效的其他选项是淡出一些其他,例如顶部淡入的

,而不是淡出文本的内容。 .但是你说你的用途是菜单,所以这并不真正适用于这里。

There's no way to fix the cleartype going ugly while the fade happens on that content. This is just a (IMO) bad decision the IE team made about how to implement their opacity filter (Direct X, which the way it's implemented in IE doesn't support ClearType).

The only other option that works well is to fade something else, like a <div> on top that fades in, rather than your content with the text fading out...but you said your use is for a menu, so that wouldn't really apply here.

迟月 2024-10-10 16:28:55

我阅读了各种针对 Internet Explorer 淡入淡出问题的潜在解决方案,但似乎没有任何效果。

最终我决定使用绝对定位的 DIV 覆盖,如本线程中所述。然而,我有一个动态高度,所以我使用 jQuery 在淡入淡出之前更改 DIV 的高度。我的代码最终看起来像这样:

$("#fade-canvas").css('height',$("#wrapper").height()+'px').show();
     /* HIDE or SHOW wrapper child elements as needed */
$("#fade-canvas").css('height',$("#wrapper").height()+'px').fadeOut(600);

用这个问题拉扯我的头发,所以希望这可以帮助别人。

I read all sorts of potential solutions for the internet explorer fade problem, but nothing seemed to work.

Ultimately I decided to go with the absolutely positioned DIV overlay as described in this thread. I have a dynamic height, however, so I used jQuery to change the height of the DIV before the fade. My code ended up looking something like this:

$("#fade-canvas").css('height',$("#wrapper").height()+'px').show();
     /* HIDE or SHOW wrapper child elements as needed */
$("#fade-canvas").css('height',$("#wrapper").height()+'px').fadeOut(600);

Pulled my hair out with this problem, so hopefully this helps someone out.

司马昭之心 2024-10-10 16:28:55

好解决方案尼克!

各种脚本已经实现了修复(例如 cycle),但目前我找到的修复此问题的最佳选项动画期间的像素化文本正是 nick 推荐的:覆盖 DIV 而不是淡化文本本身。

抱歉,我无法为蓝宝石提供更多帮助,但感谢您的阅读!

Good solution Nick!

Various scripts have implemented fixes (like cycle), but currently the best option I've found for fixing the pixelated text during animations is exactly what nick recommends: Overlaying a DIV instead of fading the text itself.

Sorry I couldn't be of more help Sapphire, but thanks for reading!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文