Blink Text HTML (BTH)

Hi guys, is anyone still confused about why the old methods like using the blink tag or the CSS attribute text-decoration: blink; don't work?

Well, on this occasion I will try to explain why and how to solve it.

Do not use this element < blink > as it is deprecated and is a bad design practice.

Although it may still work in some browsers (a small percentage), its use is not recommended as it can be removed at any time. Try to avoid it.

SOLUTION

JQuery

    setInterval(function(){
        $("#divtoBlink").toggleClass("backgroundRed");
     },100)

HTML

<div id="divtoBlink" >asdasd</div>

CSS

  .backgroundRed{
        background: red;
    }

RESULT

https://jsfiddle.net/LkuNB/1/

We can hand over this task to jQuery, besides being more customizable, we can also set the rhythm or interval or pause, for example.

The principle is like that, now just adjust it to your taste and needs!, happy working!


Post a Comment

Previous Next

نموذج الاتصال