How to Create Blinking Text & Image using Css3 | Sanwebcorner

How to Create Blinking Text & Image using Css3

In this post i will tell you how to create the Blinking text and the Blinking image with the help of css3 animation properties and the keyframe properties. This is one of the simple trick to give the opacity 0 for each one sconds, So it turns into blinking effect.The Below example have the code and live demo check it out. I hope this post is very useful.


Code for Blinking text and image:

<html>
<head>
<title>How to Create Blink Text using css</title>
<style>
.blink_text {
  animation: blinker 1s linear infinite;
}

.blink_img {
  animation: blinker 2s linear infinite;
}
@keyframes blinker {
  50% { opacity: 0; }
}
@keyframes blin {
  50% { opacity: 0; }
}
</style>
</head>
<body>
<div class="wrapper">
<h1>Blinking Text using css</h1>
<span class="blink_text">This Will Blink</span><br/>
<h1>Blinking Image using css</h1>
<span class="blink_img"><img src="https://4.bp.blogspot.com/-ZGWK5z8Zcgk/WDfoy9px9OI/AAAAAAAAC5w/Ti8W_a8KPHE8GmE46Ge4vPwpBa1CtjMdwCLcB/s1600/image-fade-effect-using-css.jpg" style="width:200px;" /></span>
</div>
</body>
</html>