Flicker

In this example below you will see how to do a Flicker with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by isthatcentered, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright isthatcentered ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Flicker</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  
<img src="https://www.eastpoint.co.uk/img/invision-logo.png" alt="" class="+flicker-out logo">
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/isthatcentered/flicker-aYjPMj */
body {
  background: rgba(0, 0, 0, 0.9);
}

.\+flicker-out {
  animation: flicker 2s, fade-out 2s cubic-bezier(0.99, 0.05, 1, 1);
  animation-delay: 0s, 2s;
  display: block;
  animation-fill-mode: forwards;
  box-shadow: 0 0 50px rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  background: rgba(255, 255, 255, 0.1);
}

@keyframes flicker {
  0% {
    opacity: 0;
  }
  9% {
    opacity: 0;
  }
  10% {
    opacity: .5;
  }
  13% {
    opacity: 0;
  }
  20% {
    opacity: .5;
  }
  25% {
    opacity: 1;
  }
}
@keyframes fade-out {
  100% {
    opacity: 0;
  }
}

Comments