嘿,大家好,我一直在尋找這個解決方案,但只找到限制字符的解決方案。我有以下代碼:jquery限制行中的段落,並應用三個階段到最後
<div id = "ta_0" style="display: none;">
<a href = "news.html">IRS announces 2011 COLA limits for qualified retirement plans</a>
<br />Most retirement plan contribution and benefit limits for 2011 will
be unchanged from 2010, the IRS has announced. The 2011 cost of
living adjustments (COLAs), as applied by their Internal Revenue
C...</div>
我想限制錨文本後兩行文字後的字符數量。我知道我可以限制字符數限制,但可能會將字數減半。相反,我只是想讓他們停下來。我還想在限制末尾附加「...」。
有什麼建議嗎?
可能重複[跨瀏覽器多行文本溢出與省略號附加寬度和高度固定div?](http://stackoverflow.com/questions/3404508/cross-browsers-mult-lines-text-overflow-with -ellipsis-added-within-a-widthhe) – kapa 2011-12-09 07:32:59