jQuery FadeTo导致IE8中的像素化文本时,font-weight:bold [英] jQuery FadeTo causing pixelated text in IE8 when font-weight: bold

查看:174
本文介绍了jQuery FadeTo导致IE8中的像素化文本时,font-weight:bold的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我淡出,在一个div:

  $('。formErrors')。fadeTo('fast' ,0); 
$('。formErrors')。fadeTo('slow',1);

但是当我在IE 8中这样做,看起来这个位的CSS:

  .formErrors li {font-weight:bold; } 

会使文字变得相当扭曲:
$ b

http://www.newmania.com/images/error .jpg



我申请的HTML是:

 < div class =formErrors> 
您的提交有错误。请修复以下内容并重试:
< ul>< li>操作为空< / li>< / ul&
< / div>

它在Firefox中正常工作。

解决方案

一个常见的解决方案是定义一个背景颜色,如果你还没有一个图像: br>
http://jsbin.com/axapa

  .formErrors {background-color:white;} 


$ b b

另一个选择是使用 fadeIn fadeOut :动画是丑陋的, : http://jsbin.com/aboxa


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?

解决方案

A common solution is to define a background color, if you don't already have an image:
http://jsbin.com/axapa

.formErrors {background-color:white;}

Another option is to use fadeIn and fadeOut: the animation is till ugly, but at least it ends up nicely: http://jsbin.com/aboxa

这篇关于jQuery FadeTo导致IE8中的像素化文本时,font-weight:bold的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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