Closed zhg-645479206 closed 5 years ago
You should not use the library if you already use a CSS solution (text-overflow: ellipsis and line-clamp).
Personally, in my projects, I use the CSS solution (text-overflow: ellipsis) to truncate 1 single line of text. When I need to truncate on multiple lines of text, I use my library.
CSS line-clamp is great but not all browsers support it, hence why I created this library.
use overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
on some android (h5),the text ends with two dots.
you use javascript methods, don't use css , the compatibility problem is solved indirectly.
Fabulous !