<h3 class="hover-3">Hover Me</h3>
.hover-3 {
  --c: #1095c1; /* the color  */
  --h: 1.2em;   /* the height */
  
  line-height: var(--h);
  background: 
    linear-gradient(var(--c) 0 0) no-repeat 
    calc(200% - var(--_p,0%)) 100%/200% var(--_p,.08em);
  color: #0000;
  overflow: hidden;
  text-shadow: 
    0 calc(-1*var(--_t,0em)) var(--c), 
    0 calc(var(--h) - var(--_t,0em)) #fff;
  transition: .3s var(--_s,0s), background-position .3s calc(.3s - var(--_s,0s));
}
.hover-3:hover {
  --_t: var(--h);
  --_p: 100%;
  --_s: .3s
}

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.