Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ellipsis for multiline text in Chrome

Tags:

html

css

ellipsis

Is there anything like -o-ellipsis-lastline for Google Chrome?

I'm building a Chrome extension and would like to ellipsize multiline text using CSS.

like image 838
mark Avatar asked Nov 13 '22 04:11

mark


1 Answers

It is impossible to create ellipsis pure CSS due to W3 spec for text-overflow.

But If you are developing Chrome Extensions you have already using JavaScript, so here is some demos and plugins to solve your problem:

  • http://www.codeitbetter.co.uk/widgets/ellipsis/
  • http://jsfiddle.net/danesparza/TF6Rb/1/
  • http://jsfiddle.net/MPkSF/
  • http://jsfiddle.net/VpmbL/
  • https://github.com/pvdspek/jquery.autoellipsis

I'm using the last plugin on my own projects.

like image 162
Vladimir Starkov Avatar answered Dec 21 '22 02:12

Vladimir Starkov