Jquery Height-Based Truncate Solution?

天涯浪子 提交于 2019-12-11 12:09:07

问题


I have a project where I need to layout a newspaper like layout with columns but the columns must be a specific height (can at least extend a very little if need be) but holds dynamic content. I need to cut the text, after a sentence ends (a period) even if that means it extends slightly past the limit. I have tried to find back-end solutions to this (as well as attempted my own), css solutions and tricks (overflow:hidden looked horrible) and other tricks here and there but cannot seem to come up with a solution.

Was wondering if there were any height based truncate libraries for JQuery that anyone knew about that preserved until the end of a sentence.

Any help is appreciated :)


回答1:


This might be what you're looking for:

http://tpgblog.com/2009/12/21/threedots-the-jquery-ellipsis-plugin/



来源:https://stackoverflow.com/questions/8397070/jquery-height-based-truncate-solution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!