<div class="heartbeat">
  <svg height="100%" width="100%">
   <polyline fill="none" stroke="gold" stroke-width="3" points="0,45 40,45 44,31 49,44 55,46 61,52 83,8 90,90 100,44 115,44 125,40 139,45 140,45
                                         150,45 180,65 194,31 199,44 205,46 211,52 233,8 240,90 250,44 265,44 275,10 290,45 300,45 
                                         320,45 360,65 394,31 399,44 405,46 411,52 433,8 440,90 450,44 465,44 475,40 490,45 500,45 ">
 </svg>
</div>
.heartbeat {
  width: 500px;
  height: 100px;
  border: 2px solid green;
  background-color: black;
  position: relative;
}
.heartbeat:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right:0;
  bottom: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 50%,  
    rgba(0, 0, 0, 0) 100%
  );
  background-repeat: repeat-x;
  background-size:130% 100%;
  background-position: 0 0;
  animation: graph 3s linear infinite;
}
@keyframes graph {
  100% {
    background-position: 600px 0;
  }
}
Run Pen

External CSS

  1. https://fonts.googleapis.com/css?family=Exo+2:700|Source+Code+Pro:400,600,700&amp;display=swap
  2. https://cdnjs.cloudflare.com/ajax/libs/gridlex/2.7.1/gridlex.css

External JavaScript

This Pen doesn't use any external JavaScript resources.