Answer the question
In order to leave comments, you need to log in
Why doesn't text-overflow: ellipsis; property work? in mozilla?
How to make it so that you get an analogue of text-overflow: ellipsis; for multiline? this is a property that adds an ellipsis to a string if the text doesn't fit in the container. No definitive solution. there is an option with -webkit-box and --webkit-line-clamp, but it doesn't work in Mozilla)
Answer the question
In order to leave comments, you need to log in
text-overflow работает в связке со следующими свойствами для inline тегов (span и пр.)
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
Пример: https://jsfiddle.net/groog/vo3x7c6w/
Для многострочного этот вариант не подходит, но есть решения на JS
Для ванилы:
https://github.com/glinford/ellipsis.js
https://github.com/josephschmitt/Clamp.js
Для JQ:
https://github.com/jjenzz/jquery.ellipsis
.line-clamp {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question