Is vertical text-overflow possible with css3?

前端 未结 2 969
遥遥无期
遥遥无期 2020-12-03 07:04

to add ellipsis to a sentence that is too long you can use this method: http://jsfiddle.net/ArKeu/

that works great for widths but is it somehow possible to add elli

相关标签:
2条回答
  • 2020-12-03 07:18

    UPDATE! UPDATE! UPDATE!

    Since the time when I wrote that answer, Clamp.js seems to have cooled-off and died. The project still exists on github so you can check it out.

    But, there is a better alternative here: ftellipsis. It is cross-browser.


    Why should webkit browsers have all the fun?

    This solution here is much more extensive, and provides support for other browsers as well. http://reusablebits.com/post/2642059628/introducing-clamp-js (dead link)

    0 讨论(0)
  • 2020-12-03 07:30

    Currently there is no cross-browser CSS-only way to achieve such behavior.

    You can do this now only in webkit-based browsers by using the -webkit-box and -webkit-line-clamp, see http://jsfiddle.net/ArKeu/7/

    0 讨论(0)
提交回复
热议问题