使用
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;"...“如果溢出,将在行尾显示。但是,这将只在一行中显示。但我希望它以多行的形式显示。
它可能看起来像这样:
+--------------------+
|abcde feg hij dkjd|
|dsji jdia js ajid s|
|jdis ajid dheu d ...|/*Here it's overflowed, so "..." is shown. */
+--------------------+发布于 2012-07-20 03:58:07
问得好..。我希望有一个答案,但这是你现在能得到的最接近CSS的答案。没有省略号,但仍然非常有用。
overflow: hidden;
line-height: 1.2em;
height: 3.6em; // 3 lines * line-heighthttps://stackoverflow.com/questions/6222616
复制相似问题