<figure class="quote" aria-label="You expect this pen to do one thing but it changed into something else. — Zach Saucier">
  <blockquote cite="" aria-hidden>
    <p class="colored-text">
      <span>but it changed into</span>
    </p>

    <div class="cut-text-container">
      <p class="cut-text">
        <span>"You expect this pen</span>
        <span>something else"</span>
      </p>
    </div>

    <p class="colored-text second">
      <span>to do one thing</span>
    </p>
  </blockquote>

  <figcaption aria-hidden><cite>Zach Saucier</cite></figcaption>
</figure>
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital@1&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito&display=swap');

* {
  margin-top: 0;
}

html, body {
  height: 100%;
}

$imageURL: "https://picsum.photos/id/190/1920/1080";
$dur: 4s;
$ease: cubic-bezier(0.85, 0, 0.15, 1);

body {
  margin: 0;
  padding: 0;
  background-image: url(#{$imageURL});
  background-size: cover;
  background-position: center;
  display: grid;
  align-items: center;
}

.quote {
  text-align: center;
  font-size: min(6vw, 120px);
  white-space: nowrap;
  
  blockquote {
    position: relative;
    display: inline-block;
    margin: 0;
  }
  
  p {
    line-height: 1.1;
    font-family: 'Amiri', serif;
    text-transform: uppercase;

    span {
      display: block;
    }
  }
  
  .cut-text-container {
    background-color: #fff;
    position: relative;
    z-index: 1;
    padding: 0px 50px;
    
    animation: moveCutClip $dur $ease infinite alternate;
    
    .cut-text {
      background-image: url(#{$imageURL});
      margin: 0;
    }
    
    span {
      color: #000;
      mix-blend-mode: lighten;
      background-color: #fff;
    }
  }
  
  .colored-text {
    color: #fff;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    animation: moveTopColoredClip $dur $ease infinite alternate;
    
    &.second {
      top: 50%;
      animation: moveBottomColoredClip $dur $ease infinite alternate;
    }
  }
  
  figcaption {
    line-height: 0.4;
  }
  cite {
    font-style: normal;
    font-family: 'Nunito', sans-serif;
    font-size: 0.4em;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    
    animation: fadeInAuthor $dur $ease infinite alternate;
  }
}

@keyframes moveCutClip {
  0%, 25% {
    clip-path: polygon(35px 0%, 100% 0%, calc(100% - 35px) 50%, 0% 50%);
  }
  75%, 100% {
    clip-path: polygon(35px 50%, 100% 50%, calc(100% - 35px) 100%, 0% 100%);
  }
}

@keyframes moveTopColoredClip {
  0%, 25% {
    clip-path: polygon(35px -100%, 100% -100%, calc(100% - 35px) 0%, 0% 0%);
  }
  75%, 100% {
    clip-path: polygon(35px 00%, 100% 0%, calc(100% - 35px) 100%, 0% 100%);
  }
}

@keyframes moveBottomColoredClip {
  0%, 25% {
    clip-path: polygon(35px 0%, 100% 0%, calc(100% - 35px) 100%, 0% 100%);
  }
  75%, 100% {
    clip-path: polygon(35px 100%, 100% 100%, calc(100% - 35px) 200%, 0% 200%);
  }
}

@keyframes fadeInAuthor {
  0%, 25% {
    opacity: 0;
  }
  75%, 100% {
    opacity: 1;
  }
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.