开发者

<blink> tag in Internet Explorer

Neith开发者_运维问答er the <blink> tag nor the text-decoration:blink; style in css are supported in Internet Explorer.

Is there any technique available for making blinking text in IE?


Avoid blinking, if possible - it annoys people.

But you can do it with JS/jQuery like this:

setInterval(jQuery('.blinking').toggle, 1500 );

That'll show/hide anything with the blinking class every 1.5 seconds.

So in the HTML you would do:

<span class="blinking">hello!</span>  

But again, think very carefully about whether it should be blinking!

If you need something to specifically draw a user's attention (and for whatever reason regular emphasis/highlighting/etc isn't good enough), then instead of on-off blinking (where the text dissappears for half the time), consider changing the colour, or a blinking underline/border, or similar.

The key thing is, if something is important enough to visually annoy the user then it should remain readable.


You can use this code:

$(document).ready(function () {
    setInterval("$('.blink').fadeOut().fadeIn();",1500);
});

and a class link this

<div class="blink">BLING BLING...</div>  

see working demo http://jsfiddle.net/SGrmM/


You can also use this code:

$(document).ready(function () {
    setInterval("$('.blink').fadeOut(150).fadeIn(150);",1000);
});

see working demo http://jsfiddle.net/SGrmM/1/


see booth examples in the same fiddle http://jsfiddle.net/SGrmM/2/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜