<h3 class="hover-4">Hover Me</h3>
.hover-4 {
  --h: 1.2em;   /* the height */
  --c: #1095c1; /* the color */
  
  line-height: var(--h);
  color: #0000;
  text-shadow: 
    20px var(--_t,var(--h)) #fff,
    0 0 var(--_c,#000);
  box-shadow: 20px var(--_t,var(--h)) red;
  clip-path: inset(0 -20px 1px 0);
  background: linear-gradient(var(--c) 0 0) 0 var(--_t,var(--h)) no-repeat;
  transition: 0.4s ,clip-path 0.4s 0.4s;
}
.hover-4:hover {
  --_t: 0;
  clip-path: inset(0 -20px calc(-1*var(--h)) 0);
  transition: 0.4s 0.4s, clip-path 0.4s;
}

body {
  height: 100vh;
  margin: 0;
  display: grid;
  place-content: center;
}
h3 {
  font-family: system-ui, sans-serif;
  font-size: 3rem;
  margin:0;
  cursor: pointer;
  padding: 0 .1em;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.