css一行显示,显示不下时用省略号代替 .title { white-space: nowrap; /* 防止文字换行 */ overflow: hidden; /* 文字溢出隐藏 */ text-overflow: ellipsis; /* 出现省略号 */ }