CSS tip: cut long titles after 2 lines with a clean "…".
.card-title {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
Works in every modern browser, Firefox included, despite the -webkit- prefix.
CSS tip: cut long titles after 2 lines with a clean "…". .card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } Works in every modern browser, Firefox included, despite the -webkit- prefix.
0 vue
Publié le 24/11/2026 17:14
CSS tip: cut long titles after 2 lines with a clean "…".
.card-title {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
Works in every modern browser, Firefox included, despite the -webkit- prefix.
0 commentaire
?