20 CSS Link Hover Effect Designs
Caret Companion
A blinking terminal cursor ▌ appears at the end of the link on hover, with a thin underline drawing in. Mono font — perfect for CLIs and dev portfolios.
Caret Companion the 17th 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-caret">$ run --watch</a>
.cle-caret {
position: relative;
display: inline-block;
padding: 2px 4px 4px;
color: #2eb88a;
font:
600 14px/1.4 ui-monospace,
monospace;
text-decoration: none;
border-bottom: 1px solid transparent;
transition: border-color 0.25s ease 0.05s;
}
.cle-caret::after {
content: "";
display: inline-block;
width: 7px;
height: 1em;
margin-left: 4px;
vertical-align: text-bottom;
background: #2eb88a;
opacity: 0;
transition: opacity 0.2s ease;
}
.cle-caret:hover,
.cle-caret:focus-visible {
border-bottom-color: rgba(46, 184, 138, 0.5);
}
.cle-caret:hover::after,
.cle-caret:focus-visible::after {
opacity: 1;
animation: cle-caret-blink 1s steps(1) infinite;
}
@keyframes cle-caret-blink {
0%,
50% {
opacity: 1;
}
51%,
100% {
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.cle-caret:hover::after,
.cle-caret:focus-visible::after {
animation: none;
opacity: 1;
}
}