任何人都知道一种方式使用CSS文本溢出包装的文本? [英] Anybody know a way to use CSS text-overflow on text that's wrapping?

查看:137
本文介绍了任何人都知道一种方式使用CSS文本溢出包装的文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道在包装到第二行的文本上使用{text-overflow:ellipsis;}吗?

Does anybody know of a way to use {text-overflow: ellipsis;} on a piece of text that's wrapping to a second line?

添加{whitespace:

Adding {whitespace: nowrap;} makes text-overflow work, but I need the text to wrap so I really can't use that.

推荐答案

唯一的缺点是这个可以成功的有限参数和事实,如果事情不排队右(它们可能不会排队),它会把一个字符切成两半。

The only downfall is the limited parameters this can be successful in and the fact that it will cut a character in half if things don't line up right (which they probably won't).

这篇关于任何人都知道一种方式使用CSS文本溢出包装的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆