<div id="body">
  <a>Hover Over Me!</a>
</div>
a {
  color: black;
  font-weight: bold;
  background: linear-gradient(90deg, red, orange, yellow, green, blue, purple);
  background-clip: text;
  -webkit-background-clip: text;
  margin: auto;
}

a:hover {
  color: transparent;
  transition: 500ms ease;
}

#body {
  font-size: 2em;
  display: flex;
  height: 100vh;
  align-items: center;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.