【发布时间】:2013-07-19 04:37:43
【问题描述】:
我需要在我的 DIV 元素中隐藏点 (...) 之后的额外文本
我正在使用
<div style="width:200px; height:2em; line-height:2em; overflow:hidden;" id="box">
this is text this is text this is text this is text
</div>
结果
它隐藏了溢出 DIV 的其余内容
但我希望如果它必须隐藏,那么三个点 ... 应该放在最后,否则不要
输出需求
这是文字这是文字这是文字...
【问题讨论】:
标签: javascript jquery html css ajax