<svg height="0" width="0" aria-hidden="true" style="position: absolute; z-index: -9999">
  <defs>
    <clipPath id="clip" clipPathUnits="objectBoundingBox">
      <rect width="1" height="1" rx="0.375" ry="0.375"/>
    </clipPath>
  </defs>
</svg>

<div class="container">
  <div class="line">
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
  </div>
</div>
body {
  margin: 0;
}

.container {
  padding: 20px;
  background: url("https://images.unsplash.com/photo-1518791841217-8f162f1e1131?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=750&q=80") no-repeat center / cover;
}

.line {
  position: relative;
  width: 40px;
  margin-left: 100px;
  overflow: hidden;
}

.line span {
  display: block;
  margin-bottom: 30px;
  padding-bottom: 100%;
  clip-path: url("#clip");
}

.line span::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(45deg, #12B55D -33.12%, #CAE700 49.77%, #FFF113 70.01%, #FFC522 92.17%, #FF7122 118.83%);
}

.line span:last-child {
  margin-bottom: 0;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.