考虑到这两封邮件"Example@example.com"one_answers"Blahblahblahblah@example.com"同时显示他们都在一个表格中,如果这两个电子邮件不能完全显示,那么他们被剪辑在他们的整体。所以"Example@example.com, Blahblahblahblah@ex..。"应该被缩减为"Example@example.com,…">
您要找的是text-overflow: ellipsis
:
div{
width:300px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit
</div>