当 font-weight: 粗体时,jQuery FadeTo 在 IE8 中导致像素化文本
我正在淡出,并在 div 中:
$('.formErrors').fadeTo('fast', 0);
$('.formErrors').fadeTo('slow', 1);
但是当我在 IE 8 中执行此操作时,似乎有点 CSS:
.formErrors li { font-weight: bold; }
导致文本返回相当扭曲:(下图)
http://www.newmania.com/images/error.jpg
我应用此的 HTML 是:
<div class="formErrors">
There are errors in your submission. Please fix the following and try again:
<ul><li>Action is empty</li></ul>
</div>
它在 Firefox 中运行良好。有什么想法吗?
I am fading out, and in a div:
$('.formErrors').fadeTo('fast', 0);
$('.formErrors').fadeTo('slow', 1);
But when I do this in IE 8, it seems this bit of CSS:
.formErrors li { font-weight: bold; }
Is causing the text to come back quite distorted: (image below)
http://www.newmania.com/images/error.jpg
The HTML I am applying this to is:
<div class="formErrors">
There are errors in your submission. Please fix the following and try again:
<ul><li>Action is empty</li></ul>
</div>
It works fine in Firefox. Any ideas please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您还没有图像,常见的解决方案是定义背景颜色:
http://jsbin.com/axapa
另一种选择是使用
fadeIn
和fadeOut
:动画很丑,但至少结局很好:http://jsbin.com/阿博萨A common solution is to define a background color, if you don't already have an image:
http://jsbin.com/axapa
Another option is to use
fadeIn
andfadeOut
: the animation is till ugly, but at least it ends up nicely: http://jsbin.com/aboxa此代码将覆盖 JQuery 中特定于 IE 的一些淡入淡出属性。我能够成功地让 fadeTo 在 IE 中正常工作: https://app.tekstme.com/signup/
This code will override some fade properties in JQuery specific to IE. I was able to successfully get fadeTo to work properly in IE here: https://app.tekstme.com/signup/
我知道这个线程确实很旧,但我找到了一个简单的解决方案。使用背景不适用于我的情况,因为我的文本后面有一个复杂的背景,其背景必须是透明的。无论如何,我发现这个工作得很好(要添加的 CSS 代码):
I know this thread is really old but i found a simple solution. Using background was not applicable for my case because i had a complex background behind text whose background had to be transparent. Anyway I found this one working pretty well (css code to add):
使用 在 IE8 中为我解决了这个问题。文字在淡入淡出过程中看起来仍然是块状的,但之后就变得平滑了
Using <!DOCTYPE html> fixed this issue for me in IE8. The text still looks blocky during the fade but afterwards it smoothes out