Wednesday, August 23, 2017

Strings kürzen mit CSS

Strings kürzen mit CSS


Man kann Strings k�rzen und "..." anh�ngen auch automatisch mit CSS:

.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
-moz-binding: url(assets/xml/ellipsis.xml#ellipsis);
}
 
Geht im alten Firefox zwar nicht, aber der ist nicht mehr so verbreitet.
Quelle: http://mattsnider.com/css/css-string-truncation-with-ellipsis/

download file now