【问题标题】:Distortion of text in IEIE中的文字失真
【发布时间】:2011-02-01 00:53:19
【问题描述】:

我正在使用 shinding engine ,每当我移动一个小工具进行重新定位时,该小工具内的粗体文本就会失真。

【问题讨论】:

    标签: javascript jquery internet-explorer-8 apache-shindig


    【解决方案1】:

    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

    【讨论】:

      【解决方案2】:

      Internet Explorer 在执行诸如 jQuery 淡入淡出和您提供的示例等任务时暂时摆脱了抗锯齿功能!

      【讨论】:

        【解决方案3】:

        这是一个自定义的 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);
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2016-02-10
          • 1970-01-01
          • 2016-06-17
          • 2014-12-13
          • 2023-02-16
          • 2012-07-26
          • 1970-01-01
          相关资源
          最近更新 更多