Home >Web Front-end >CSS Tutorial >Truncating multiline text with line-clamp
line-clamp is a CSS property that allows you to truncating multiline text (cut off text) within an HTML element to a certain number of lines. It’s perfect for when you want to show only a part of long text, like titles, product descriptions or article excerpts, while keeping readability and looks.
See the following Codepen for a demo:
Full article: https://snippflow.com/snippet/truncating-multiline-text-with-line-clamp/
CSS Snippets
The above is the detailed content of Truncating multiline text with line-clamp. For more information, please follow other related articles on the PHP Chinese website!