M
M
Mdmitr2019-04-03 12:45:25
JavaScript
Mdmitr, 2019-04-03 12:45:25

How to cut text by adding ... at the end, and on hover display the full text in the popup message?

How to cut text by adding ... at the end, and when you hover over the text, display the full text in the popup message (if the text is cut off)? The text is a lot of lines.
Site on React js.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2019-04-03
@dimoff66

If not necessarily by words, then you can use styles

div.text {
   width: 200px;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}

How to make a hint on the Internet a huge number of examples

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question