<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: 
    0 var(--h) #fff,
    0 0 #000;
  clip-path: inset(0 0 1px 0);
  transition: 0.4s;
}
.hover-4:hover {
  clip-path: inset(0 0 calc(-1*var(--h)) 0);
}

body {
  height: 100vh;
  margin: 0;
  display: grid;
  place-content: center;
  background: pink;
}
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.