<html>
  <head>
    <link href="https://fonts.googleapis.com/css?family=Libre+Barcode+128" rel="stylesheet">
  </head>
  <body>
    <div class="BarcodeContainer">
      <div class="Barcode">Hello World!</div>
      <div class="BarcodeCover"></div>
    </div>
  </body>
</html>
html, body {
  font-family: 'Libre Barcode 128', cursive;
  font-size: 100px;
}

.BarcodeContainer {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.Barcode {
  position: relative;
  animation: 3.4s BarcodeRevealing infinite;
}

.BarcodeCover {
  position: absolute;
  left: -3px;
  top: 0;
  height: 60px;
  width: 100%;
  background: black;
  border-radius: 6px;
  animation: 1.7s BarcodeOverlay forwards infinite;
  animation-timing-function: ease-out;
}

@keyframes BarcodeOverlay {
  0% {
    transform: scaleX(0);
    transform-origin: left;
  }
  
  50% {
    transform: scaleX(1);
    transform-origin: left;
  }
  
  51% {
    transform-origin: right;
  }
  
  100% {
    transform: scaleX(0);
    transform-origin: right;
  }
}

@keyframes BarcodeRevealing {
  0% {
    opacity: 0;
  }
  
  25% {
    opacity: 0;
  }
  26% {
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  76% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.