【发布时间】:2011-02-03 08:03:44
【问题描述】:
<div style="width: 100px; height:50px; line-height:50px; overflow:hidden;">
<p>A short line</p>
</div>
<div style="width: 100px; height:50px; line-height:50px; overflow:hidden;">
<p>A really really really long line</p>
</div>
第二个示例中的换行文本被截断,因为 line-height:50px 在本例中应该是 25px。如何使用 jQuery 查找元素中是否存在单行或多行文本?
谢谢!
【问题讨论】: