CSS word ellipsis ('…') after one or two lines

前端 未结 9 1986
执笔经年
执笔经年 2021-01-01 23:40

I\'m trying to create a word-wrap in JavaScript using CSS, and the condition is:

If DIV contains one very long word, such as \"asdasfljashglajksgkjasghk

9条回答
  •  清酒与你
    2021-01-02 00:31

    when you'll be allowed to use jQuery you could see the dotdotdot plugin at this link.. very simple to use and it works great!

    For the moment i can suggest you to have a look at this fiddle! whould work the text-overflow: ellipsis

提交回复
热议问题