How can I access the actual text that is displayed in a DIV when using CSS style overflow: hidden?

前端 未结 7 718
名媛妹妹
名媛妹妹 2020-12-20 18:43

I have the following content DIV on my page, which displays dynamic text:

It uses the following

7条回答
  •  离开以前
    2020-12-20 18:47

    There is no need to use Javascript to have the ellipsis. You can simply use the CSS text-overflow property and set its value to "ellipsis". You see the documentation here.

    And if you want to have it after multiple lines, then advise this guide.

提交回复
热议问题