版权声明:未经本人同意不得私自转载 https://blog.csdn.net/qq_40190624/article/details/83270449
以下三个需要配合使用:
text-overflow: ellipsis; //字体超出用省略号显示
overflow:hidden; // 超出隐藏
white-space:nowrap // 不换行
div{
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}