开发者

Text Pixilation in IE8

开发者 https://www.devze.com 2023-02-17 10:33 出处:网络
I am getting a weird text issue in IE caused by my JavaScript. I tried to paste the JavaScript here but it won\'t format right so instead I dropped it here: http://pastebin.me/5201856c0083c61e67f40b

I am getting a weird text issue in IE caused by my JavaScript.

I tried to paste the JavaScript here but it won't format right so instead I dropped it here: http://pastebin.me/5201856c0083c61e67f40bd19914241f

I included a开发者_StackOverflow社区 screen grab below. Anyone know how to fix this for IE?

Text Pixilation in IE8


Try cleartype

http://malsup.com/jquery/cycle/cleartype.html

It removes the filter IE uses to fade text after it fully fades in.


If setting a background colour isn’t an option, I think the solution is to remove the filter property of the faded element once the animation’s finished, via a callback function.

In your code, you could define a function that does this:

function fixIEFade() {
    if ( $.browser.msie ) {
        this.style.removeAttribute('filter');
    }
}

Then set it to be the callback in your calls to animate:

//Set the fade in effect for the next image, show class has higher z-index
next.css({opacity: 0.0}).addClass('show').animate({opacity: 1.0}, 1000, fixIEFade);
//Hide the current image
current.animate({opacity: 0.0}, 1000, fixIEFade).removeClass('show');

I think that should work?

0

精彩评论

暂无评论...
验证码 换一张
取 消