CSS 2行文本溢出 解决方法

width: 4rem;
height: 0.64rem;
line-height: 0.32rem;
overflow:hidden; 
text-overflow:ellipsis;
display:-webkit-box; 
-webkit-box-orient:vertical;
-webkit-line-clamp:2;

单行文本溢出 css 写法

width: 4rem;
height: 0.32rem;
line-height: 0.32rem;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;