ホバー
CSS

Underline Slide

ナビゲーションリンク用。左→右へスライドするアンダーライン。

HTML
<nav class="nav-links">
  <a href="javascript:void(0)">Products</a>
  <a href="javascript:void(0)">Pricing</a>
  <a href="javascript:void(0)">About</a>
</nav>
CSS
.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  position: relative;
  color: #999;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding-bottom: 4px;
  transition: color .25s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1.5px;
  background: #1a1a1a;
  transition: width .3s cubic-bezier(.4,0,.2,1);
}
.nav-links a:hover { color: #1a1a1a; }
.nav-links a:hover::after { width: 100%; }