20 CSS Link Hover Effect Designs
Type-On Reveal
Link text appears empty until hover; on hover it types itself character-by-character via a steps() animation with a blinking caret. The CTA itself is the animation.
Type-On Reveal the 20th of 20 designs in the 20 CSS Link Hover Effect Designs collection. The design is implemented in pure CSS — no JavaScript required. Copy the HTML and CSS panels below into your project. Because the demo is pure CSS, it works in any framework or templating engine you happen to use. The design honours prefers-reduced-motion and uses real semantic markup, so it ships accessibility-ready out of the box.
Live preview
The code
<a href="#" class="cle-type"> <span class="cle-type-text">$ deploy --prod</span> </a>
.cle-type {
position: relative;
display: inline-block;
padding: 6px 14px;
background: #0a0a18;
border: 1px solid rgba(0, 229, 255, 0.3);
border-radius: 4px;
text-decoration: none;
min-width: 160px;
}
.cle-type-text {
display: inline-block;
font:
600 13px/1.4 ui-monospace,
monospace;
color: #00e5ff;
white-space: nowrap;
overflow: hidden;
width: 0;
border-right: 2px solid transparent;
vertical-align: bottom;
}
.cle-type:hover .cle-type-text,
.cle-type:focus-visible .cle-type-text {
width: 14ch;
border-right-color: #00e5ff;
animation:
cle-type-in 1.2s steps(14, end) forwards,
cle-type-blink 0.7s steps(1) 1.2s infinite;
}
@keyframes cle-type-in {
from {
width: 0;
}
to {
width: 14ch;
}
}
@keyframes cle-type-blink {
0%,
50% {
border-right-color: #00e5ff;
}
51%,
100% {
border-right-color: transparent;
}
}
@media (prefers-reduced-motion: reduce) {
.cle-type:hover .cle-type-text,
.cle-type:focus-visible .cle-type-text {
width: 14ch;
animation: none;
border-right-color: #00e5ff;
}
}