Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想用 text-overflow: ellipsis 创建多行 div,但 div 只有一行。
参见示例: http ://cssdesk.com/CDS4V
谢谢
我想要类似的效果,最后我使用了jquery dotdot 插件。我发现它很容易使用,它就像魔法一样工作:)
如果您需要不同的解决方案,这里有另一个人提出了类似的问题:
如果内容太宽,请在 HTML 标记中插入省略号 (...)