26 June 2021

Blinking background color animation CSS

 Demo

@keyframes blink-up {
  from {
    background: #215448;
  }
  to {
    background: none;
  }
}

@keyframes blink-down {
  from {
    background: #613e45;
  }
  to {
    background: none;
  }
}

.cell-blink-up {
  color: inherit;
  text-decoration: blink;
  animation-name: blink-up;
  -webkit-animation-name: blink-up;
  animation-duration0.6s;
  -webkit-animation-duration0.6s;
  animation-iteration-count1;
  -webkit-animation-iteration-count1;
  animation-timing-function: ease-in-out;
  -webkit-animation-timing-function: ease-in-out;
  animation-direction: alternate;
  -webkit-animation-direction: alternate;
}

.cell-blink-down {
  color: inherit;
  text-decoration: blink;
  animation-name: blink-down;
  -webkit-animation-name: blink-down;
  animation-duration0.6s;
  -webkit-animation-duration0.6s;
  animation-iteration-count1;
  -webkit-animation-iteration-count1;
  animation-timing-function: ease-in-out;
  -webkit-animation-timing-function: ease-in-out;
  animation-direction: alternate;
  -webkit-animation-direction: alternate;
}

0 nhận xét:

Post a Comment

 

BACK TO TOP

Xuống cuối trang