css animation blink code example

Example 1: css blink animation

.blink{
  width:200px;
  height: 50px;
  background-color: magenta;
  padding: 15px;	
  text-align: center;
  line-height: 50px;
}
span{
  font-size: 25px;
  font-family: cursive;
  color: white;
  animation: blink 1s linear infinite;
}
@keyframes blink{
  0%{opacity: 0;}
  50%{opacity: .5;}
  100%{opacity: 1;}
}

Example 2: css blink

.blink_me {
  animation: blinker 1s linear infinite;
}

@keyframes blinker {
  50% {
    opacity: 0;
  }
}

<div class="blink_me">BLINK ME</div>

Example 3: blink css

.blink {
  animation: blink 1s step-start infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

Tags:

Css Example