vue-超出一行或多行显示省略号

一定要设置宽度,当然,如果你的盒子内容就是占满一行,当我没说
1,css超出一行用点表示
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;

2,css超出二行用点表示
overflow:hidden;
text-overflow:ellipsis;
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2; // 想要超出三行显示 就把这里改成3就好了

猜你喜欢

转载自blog.csdn.net/weixin_62355341/article/details/124413836