How To Create Flashing/Blinking Text With CSS3 Animations

We used to have <blink> tag to create the blinking text on webpages. It is now deprecated, but good news is that we have CSS3 animations that can produce the same blinking effect. Here is the demo.

HTML For Flashing/Blinking Text

<span class="blink">A blinking text</span>

CSS For Flashing/Blinking Text

.blink {
    -webkit-animation: blink 1s step-end infinite;
            animation: blink 1s step-end infinite;
}
@-webkit-keyframes blink { 50% { visibility: hidden; }}
        @keyframes blink { 50% { visibility: hidden; }}

View Demo

The above CSS will blink the text at 1 second interval infinitely. You can play around with the CSS to change the look and feel of the flashing effect by clicking the View Demo button above. Below is the CSS to create a red text that will flash/blink at 2 seconds interval.

.blink {
    -webkit-animation: blink 2s step-end infinite;
            animation: blink 2s step-end infinite;
                color: #FF0000;
}
@-webkit-keyframes blink { 50% { visibility: hidden; }}
        @keyframes blink { 50% { visibility: hidden; }}}

All right guys, that’s all you need to creating flashing/blinking text with CSS3 animations.