css文本一行和两行,超出省略表示
重点:text-overflow: ellipsis;只对display:inline;起作用
css 文本一行显示,超出省略号表示
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
css 文本两行显示,超出省略号表示
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
链接: https://www.cnblogs.com/xiaosuibu/p/8196067.html.
链接: https://www.freesion.com/article/11011153218/
链接: https://blog.csdn.net/qq_40204835/article/details/99681069