[Refresh] This is different from this question because it not only requests truncation of the text; as I mentioned, I already have text truncation using this approach . Rather, he asks that the “read more” link only occurs when the text is truncated (using CSS, if possible).
I am currently using this approach to generate ellipsis when overflowing text (when it cannot fit on one line). However, now I also want to include the “Read More” link at the end of the line when an overflow occurs, and clicking this link will display all the content on several lines. Can this only be done with CSS?
btw, I saw this post that displays the "more" link, regardless of whether the text is full or not, which is not what I want.
I assume that the latter tool will use javascript with a listener resize()
that dynamically hides the overflowing part of the text and creates a link to display them.
Thanks!
source
share