How can i blink a text twice every 5 second using css
i have a div
<div class="blink">text</div>
I want to blink this text twice every 5 second using css
how can i achieve this?
i tried this
how to make CSS animation to play every 10 seconds
but not working in ie
i want this to work in ie and chrome
Use animation and adjust the properties like below:
.blink {
color:black;
font-size:30px;
font-weight:bold;
animation:blink 2.5s linear infinite alternate 2.5s;
}
@keyframes blink {
80% {
color:black;
}
90% {
color:red;
}
100% {
color:black;
}
}
<div class="blink">This text will blink twice every 5 seconds</div>
#text {
font-weight: bold;
font-size: 20px;
animation-name: blink;
animation-duration: 5s;
animation-iteration-count: infinite;
}
@keyframes blink {
0% {color: pink}
50% {color: black;}
100% {color: pink;}
}
<div id="text">
No more lights
</div>
You can see CSS3 animation examples / attributes in here : https://www.w3schools.com/css/css3_animations.asp
Also another StackOverFlow post is here: https://stackoverflow.com/a/16012979/3366361
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With