【发布时间】:2011-02-01 00:53:19
【问题描述】:
我正在使用 shinding engine ,每当我移动一个小工具进行重新定位时,该小工具内的粗体文本就会失真。
【问题讨论】:
标签: javascript jquery internet-explorer-8 apache-shindig
我正在使用 shinding engine ,每当我移动一个小工具进行重新定位时,该小工具内的粗体文本就会失真。
【问题讨论】:
标签: javascript jquery internet-explorer-8 apache-shindig
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
【讨论】:
Internet Explorer 在执行诸如 jQuery 淡入淡出和您提供的示例等任务时暂时摆脱了抗锯齿功能!
【讨论】:
这是一个自定义的 fadeIn/fadeOut/fadeTo 来解决您的问题
(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);
【讨论】: