Strikethrough
Underline & Decoration · Animated · pure CSS
A colored line draws itself across the middle of the text, holds, then retracts — a looping strikethrough, set apart from the underlines.
How it works
Strikethrough is an animated underline & decoration text effect rendered entirely in CSS. It works on a single element — just add the .text-effect class, with no extra HTML.
Controls
Strikethrough exposes 3 dedicated controls — Line Hue, Thickness and Speed — on top of the shared type controls (font, weight, letter-spacing and case). Open it in the generator to tune every value live, then copy the updated CSS.
CSS
/* Strikethrough — made with TEXT-FX · https://text-fx.app
* HTML: just put the class on any element.
* Font: 'Major Mono Display', monospace (load from Google Fonts).
*/
.text-effect {
font-family: 'Major Mono Display', monospace;
font-weight: 900;
letter-spacing: 2px;
text-transform: none;
}
.text-effect {
display: inline-block;
color: hsl(257 20% 92%);
background-image: linear-gradient(hsl(257 30% 60%), hsl(257 30% 60%));
background-repeat: no-repeat;
background-position: left center;
background-size: 0% 2px;
animation: text-effect-strike 4.2s ease-in-out forwards;
}
.text-effect:hover {
animation-name: text-effect-strike-r;
}
@keyframes text-effect-strike {
0% { background-size: 0% 2px; }
100% { background-size: 100% 2px; }
}
@keyframes text-effect-strike-r {
0% { background-size: 0% 2px; }
100% { background-size: 100% 2px; }
}
Pure CSS — just add the .text-effect class to any element.
- Category
- Underline & Decoration
- Type
- Animated
- Browser support
- Animated background-size width on a centred line
- Capabilities
- pure