One, single line overflow
Must have width
width:300px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
Two, multi-line overflow
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
- -webkit-box-orient: Arrangement
- -webkit-line-clamp:The number of lines of text displayed by a block element
Friendship link: link