⏲️ Estimated reading time: 3 min
Blink Animation CSS Effect for Eye-Catching Elements. Learn how to create a blinking effect using CSS animations. Ideal for drawing attention to text or buttons on your WordPress site using only simple CSS code.
🎯 What is a Blink Animation?
A blink animation makes elements like text or buttons blink at a consistent interval. This effect is commonly used to draw attention to a warning, call-to-action, or limited-time message.
With just a few lines of CSS, you can apply this effect without JavaScript or external libraries.

💡 CSS Code for Blink Animation Using Opacity
Here’s how to create a blink effect using opacity
for smooth visibility toggling:
.blink {
animation: blink-animation 1s steps(2, start) infinite;
-webkit-animation: blink-animation 1s steps(2, start) infinite;
}
@keyframes blink-animation {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@-webkit-keyframes blink-animation {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
🧪 How to Use It in WordPress
- Go to your WordPress Dashboard.
- Navigate to Appearance > Customize > Additional CSS.
- Paste the CSS code above and Publish.
- In your post or page editor, add the class to any element you want to blink:
<p class="blink">Attention! Limited-time offer!</p>
Or apply it to a button or div:
<button class="blink">Click Me!</button>
🎨 Customize the Blink Speed
Adjust the 1s
value in the .blink
rule to control speed:
0.5s
= faster blink2s
= slower blink
🧩 CSS Code Using Visibility
Here’s a clean version of the blink animation using visibility
:
.blink {
animation: blink-animation 2s steps(2, start) infinite;
-webkit-animation: blink-animation 2s steps(2, start) infinite;
}
@keyframes blink-animation {
to {
visibility: hidden;
}
}
@-webkit-keyframes blink-animation {
to {
visibility: hidden;
}
}
🛠️ How to Use in WordPress
- From your WordPress Dashboard, go to Appearance > Customize > Additional CSS.
- Paste the code above and click Publish.
- In any post or page, add the
.blink
class to the HTML block or element:
<p class="blink">Warning: This offer ends soon!</p>
You can use it on <p>
, <span>
, <button>
, or any HTML tag.
⚙️ Customize the Blink Speed
Modify the duration value in the .blink
class to control speed:
1s
= fast blink2s
= normal blink3s
= slow blink
You can also change steps(2, start)
to a smooth fade by switching to a linear
or ease
timing function and using opacity
instead of visibility
.
✅ When to Use Blink Effects
- Highlighting urgent messages
- Drawing attention to CTAs
- Limited-time offers
Keep in mind that excessive blinking can hurt user experience, so use it sparingly.
📩 Do you have questions or suggestions? Leave a comment or contact us!
🏷️ Tags: css, animation, blink effect, visibility, wordpress css, front-end design, custom css, web animation, user interface, blinking text
⚠️ Tips
- Don’t overuse this effect it can be distracting.
- Great for countdowns, urgent messages, or calls to action.
- Works in all modern browsers.
📩 Do you have questions or suggestions? Leave a comment or contact us!
🏷️ Tags: css animation, blink effect, wordpress css, web design, ui tips, html tricks, website animation, css3, blinking text, custom css
Only logged-in users can submit reports.
Discover more from HelpZone
Subscribe to get the latest posts sent to your email.