2011-01-31 136 views
2

即時通訊使用shinding引擎,每當我移動一個小工具進行重新定位時,該小工具中的粗體文本會變形。執行這樣的任務,如jQuery的褪色,你給的例子時暫時IE中的文本扭曲

  1. Before Moving gadget
  2. After moving gadget

回答

5

IE有一個問題,即一旦修改了DOM的某些部分,就會停止使用消除鋸齒。有一些變通辦法(谷歌爲這些)。我認爲IE9修復了這個問題。

看到這個問題: jQuery fadeIn leaves text not anti-aliased in IE7

連接,在似乎已經死了。

其中這兩個變化可能會幫助(你可以有哪些元素進行實驗,並將其應用到):

myElement.style.filter = ''; 

$(myElement).removeAttr('style'); 

其他信息: http://reference.sitepoint.com/css/haslayout http://reference.sitepoint.com/css/filter

+0

沒有任何解決方案似乎對我有用。 – Neeraj 2011-01-31 12:23:31

1

這是一個自定義淡入/淡出/淡入解決您的問題

(function($) { 
    $.fn.customFadeIn = function(speed, callback) { 
     $(this).fadeIn(speed, function() { 
      if(!$.support.opacity) 
       $(this).get(0).style.removeAttribute('filter'); 
      if(callback != undefined) 
       callback(); 
     }); 
    }; 
    $.fn.customFadeOut = function(speed, callback) { 
     $(this).fadeOut(speed, function() { 
      if(!$.support.opacity) 
       $(this).get(0).style.removeAttribute('filter'); 
      if(callback != undefined) 
       callback(); 
     }); 
    }; 
    $.fn.customFadeTo = function(speed,to,callback) { 
     return this.animate({opacity: to}, speed, function() { 
      if (to == 1 && jQuery.browser.msie) 
       this.style.removeAttribute('filter'); 
      if (jQuery.isFunction(callback)) 
       callback(); 
     }); 
    }; 
})(jQuery);