How to complete sentence with an ellipsis at the end?

Using backbone, I deduce on page the text from the model so {{ text }} how to display only part of text and add ellipsis at the end if the text is too long (for example, does not fit in 2 lines)?
July 9th 19 at 10:17
3 answers
July 9th 19 at 10:19
.box {
 width: 250px;
 white-space: nowrap;
 overflow: hidden;
 text-overflow: ellipsis;

Here are other options
July 9th 19 at 10:21
Codepen example
Thank you, and it works in all browsers? - Scottie_Kassulke commented on July 9th 19 at 10:24
: and my version? - blake_Eichma commented on July 9th 19 at 10:27
: not really, ie&ff three points not added, as far as I remember, had the js-th to add them - Kayden_Schiller commented on July 9th 19 at 10:30
July 9th 19 at 10:23
If you give styles, as in the examples above, it is not cross-browser solution, because the browser developers, to put it mildly, I seem to be sometimes complete idiots who do not care about their browsers.

In this case, it is necessary to use the library shorten.js

Find more questions by tags CSSHTMLBackbone.jsJavaScript