Link Hover Underline

Mood track «Light Thought var 2» · Kevin MacLeod incompetech.com · licensed under Creative Commons BY 4.0
Example image of the style Link Hover Underline
Preview built in HTML and CSS in this style

Sottolineatura animata · Subrayado animado · Animated underline · Hover dei link · Link hover effects

On hover, link underlines don't just snap on; they draw in, slide across, wave or turn into a highlighter. A tiny detail that brings even a text-only page to life.

Era
2013 – today
Use
Mainstream
Domain
Web / UIMotion
Mood
elegantsubtleplayful
Explore

Live demo

View code
<main class="t">
  <nav><a class="l4" style="--i:0">Rivista</a><a class="l4" style="--i:1">Archivio</a><a class="l4" style="--i:2">Chi siamo</a></nav>
  <h1>Piccoli dettagli</h1>
  <p>Un buon link si <a class="l1">disegna sotto la parola</a>, oppure si fa <a class="l2">evidenziare</a> come su un quaderno, o ancora <a class="l3">ondeggia con calma</a> mentre il resto della pagina resta fermo.</p>
</main>
body{margin:0;height:100vh;display:grid;place-items:center;background:#FBF8F1;color:#1C1A17;font-family:Newsreader,serif;overflow:hidden}
.t{width:min(520px,86vw)}
nav{display:flex;gap:22px;font-size:14px;font-weight:500;letter-spacing:.06em;text-transform:uppercase;margin-bottom:14px}
h1{font:400 clamp(34px,8vw,52px)/1 'Instrument Serif',serif;margin:0 0 10px}
p{font-size:clamp(17px,4vw,20px);line-height:1.55;margin:0}
a{color:inherit;text-decoration:none;cursor:pointer}
.l1{background:linear-gradient(#FF5C39,#FF5C39) 0 100%/100% 2px no-repeat;color:#FF5C39}
.l2{background:linear-gradient(#FFE066,#FFE066) 0 100%/100% 100% no-repeat;padding:0 2px}
.l3{color:#3554F0;padding-bottom:5px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='6'%3E%3Cpath d='M0 3q5-4 10 0t10 0' fill='none' stroke='%233554F0' stroke-width='1.6'/%3E%3C/svg%3E") 0 100%/20px 6px repeat-x}
.l4{position:relative}
.l4::after{content:"";position:absolute;left:0;right:0;bottom:-3px;height:1.5px;background:currentColor;transform:scaleX(0)}
.l4:first-child::after{transform:none}
a:focus-visible{outline:2px solid #3554F0;outline-offset:3px}
@media (prefers-reduced-motion:no-preference){
  .l1{background-size:0 2px;color:inherit;transition:background-size .45s cubic-bezier(.65,0,.35,1),color .3s;animation:sweep 4s cubic-bezier(.65,0,.35,1) infinite}
  .l1:hover{background-size:100% 2px;color:#FF5C39}
  .l2{background-size:100% 2px;transition:background-size .35s cubic-bezier(.65,0,.35,1);animation:mark 4s cubic-bezier(.65,0,.35,1) 1s infinite}
  .l2:hover{background-size:100% 100%}
  .l3{animation:wave 1.2s linear infinite}
  .l4::after{transition:transform .35s cubic-bezier(.65,0,.35,1);animation:center 3.6s cubic-bezier(.65,0,.35,1) infinite;animation-delay:calc(var(--i)*1.2s)}
  .l4:first-child::after{transform:scaleX(0)}
  .l4:hover::after{transform:scaleX(1)}
  .t:hover .l1,.t:hover .l2,.t:hover .l4::after{animation:none}
  @keyframes sweep{0%,10%{background-size:0 2px;background-position:0 100%;color:inherit}35%,55%{background-size:100% 2px;background-position:0 100%;color:#FF5C39}56%{background-position:100% 100%}80%,100%{background-size:0 2px;background-position:100% 100%;color:inherit}}
  @keyframes mark{0%,10%{background-size:100% 2px}35%,60%{background-size:100% 100%}85%,100%{background-size:100% 2px}}
  @keyframes wave{to{background-position:20px 100%}}
  @keyframes center{0%,5%{transform:scaleX(0)}15%,30%{transform:scaleX(1)}40%,100%{transform:scaleX(0)}}
}

Characteristics

  • Line growing from the left via background-size
  • Exit on the side opposite the entry
  • Highlighter filling the word from below
  • Scrolling wavy underline
  • Same effects on keyboard focus

Palette

Click a swatch to copy it

Typography

Headings · Instrument Serif Link Hover Underline

Body · Newsreader On hover, link underlines don't just snap on; they draw in, slide across, wave or turn into a highlighter. A tiny detail that brings even a text-only page to life.

Motion

Easing
cubic-bezier(0.65, 0, 0.35, 1) in entrata e uscita
Typical duration
200–450 ms
Techniques
background-image linear-gradient con background-size, ::after con transform scaleX e transform-origin, text-decoration-thickness e text-underline-offset, SVG ondulato in data URI con background-position, :hover e :focus-visible, box-decoration-break clone per link su più righe

Accessibility (reduced motion)

Switch underline and colour instantly on hover or focus, with no sliding lines or moving waves.

Prompt for your agent

Copy and paste into your prompt to have an agent or image generator reproduce this style.

For web pages and UI

Design the web page or interface in this style: Link Hover Underline (Sottolineatura animata, Subrayado animado).
On hover, link underlines don't just snap on; they draw in, slide across, wave or turn into a highlighter. A tiny detail that brings even a text-only page to life.
Characteristics: Line growing from the left via background-size, Exit on the side opposite the entry, Highlighter filling the word from below, Scrolling wavy underline, Same effects on keyboard focus.
Palette: #FBF8F1, #1C1A17, #FF5C39, #3554F0, #FFE066.
Typography: headings in Instrument Serif, body text in Newsreader (Google Fonts or equivalents).
Mood: elegant, subtle, playful.
Motion: easing cubic-bezier(0.65, 0, 0.35, 1) in entrata e uscita, typical duration 200–450 ms; techniques: background-image linear-gradient con background-size, ::after con transform scaleX e transform-origin, text-decoration-thickness e text-underline-offset, SVG ondulato in data URI con background-position, :hover e :focus-visible, box-decoration-break clone per link su più righe.
With prefers-reduced-motion: Switch underline and colour instantly on hover or focus, with no sliding lines or moving waves.
References: Codrops «Creative Link Effects», CSS-Tricks «Cool CSS Hover Effects That Use Background Clipping, Masks, and 3D», MDN «text-underline-offset», siti editoriali come The Pudding.

Relations

Similar to: Image Hover RevealImage Hover RevealSimilar to: Micro-interactionsMicro-interactionsSimilar to: Editorial LayoutEditorial LayoutSimilar to: Sliding tab indicatorSliding tab indicatorLink Hover Underline
Similar toSee in the graph →

References

  • Codrops «Creative Link Effects»
  • CSS-Tricks «Cool CSS Hover Effects That Use Background Clipping, Masks, and 3D»
  • MDN «text-underline-offset»
  • siti editoriali come The Pudding