How To: Question for CSS

Hi everyone, I have a quick question. What am I missing here?

I’m trying to make the underscore _ blink, does anyone know what i did wrong or missing here to make it blink?

.blink {
-webkit-animation: blink 1s infinite;
-moz-animation: blink 1s infinite;
animation: blink 1s infinite;
}
=keyframes(blink){
@-webkit-keyframes #{blink}
@content
@-moz-keyframes #{blink}
@content
@-ms-keyframes #{blink}
@content
@keyframes #{blink}
@content
}

+keyframes(blink){
0% {
opacity: 0}
50% {
opacity: 1}
100% {
opacity: 0}
}

  • Thanks
<h1>text<span class="blink">_</span></h1>

try looking into this article from mdn, see if this is useful, happy reading :slight_smile: @keyframes - CSS: Cascading Style Sheets | MDN

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.