1. 字符包裹元素可控制宽度
2. 包裹元素中包含代码
.wrapper { ... text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }