How can I mimic text-overflow: ellipsis in Firefox?

前端 未结 13 1196
抹茶落季
抹茶落季 2020-12-15 19:04

I have some dynamic text contained in a div that is set to whatever a user enters in a textbox field. If the text doesn\'t fit in the div, right now it just gets cut off at

13条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-15 19:28

    If you're using jQuery, there's a great plugin I use.

    Alternatively, [this example] (404 NOT FOUND!) seems to work cross browser.

    Any questions, hit me up in the comments!

    404 link: http://www.hedgerwow.com/360/dhtml/text_overflow/demo2.php

提交回复
热议问题