Slide Underline
Underline & Decoration · Animated · pure CSS
A gradient underline bar grows in from the left beneath the text. Clean, modern link and heading emphasis.
CSS
/* Slide Underline — generated with TEXT-FX
* HTML: just put the class on any element.
* Font: 'Space Mono', monospace (load from Google Fonts).
*/
.text-effect {
font-family: 'Space Mono', monospace;
font-weight: 900;
letter-spacing: 4px;
text-transform: uppercase;
}
.text-effect {
position: relative;
display: inline-block;
color: hsl(95 25% 96%);
padding-bottom: 8px;
}
.text-effect::after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 5px;
border-radius: 5px;
background: linear-gradient(90deg, hsl(95 90% 58%), hsl(145 90% 60%));
transform-origin: left center;
animation: text-effect-grow 0.9s ease-in-out infinite alternate;
}
@keyframes text-effect-grow {
0% { transform: scaleX(0); }
100% { transform: scaleX(1); }
}
Pure CSS — just add the .text-effect class to any element.
- Category
- Underline & Decoration
- Type
- Animated
- Browser support
- ::after pseudo-element + transform animation
- Capabilities
- pure