An Interest In:
Web News this Week
- April 29, 2024
- April 28, 2024
- April 27, 2024
- April 26, 2024
- April 25, 2024
- April 24, 2024
- April 23, 2024
July 17, 2019 09:53 pm GMT
Original Link: https://css-tricks.com/multi-line-truncation-with-pure-css/
Multi-Line Truncation with Pure CSS
Truncating a single line of text if is fairly straightforward. Truncating multiple lines is a bit harder. Using just CSS (no JavaScript or server-side dancing) is nice for the simplicity. It's gotten a little easier lately since Firefox (since version 68) has started supporting the ultra-bizarre -webkit-line-clamp
soup method, which makes browser support for that pretty OK.
There is another way though, which is very clever and something I'd call a bonafide CSS trick. We somehow failed to … Read article
The post Multi-Line Truncation with Pure CSS appeared first on CSS-Tricks.
Original Link: https://css-tricks.com/multi-line-truncation-with-pure-css/
Share this article:
Tweet
View Full Article