1, single-line text display ellipsis
div{
width:200px;
overflow:hideen;
white-space:nowrap;
text-overflow:ellipsis;
}
2, multi-line text display ellipsis
div{
width:200px;
overflow:hideen;
text-overflow:ellipsis;
display: -webkit-box; // display the object as an elastic stretch Box Model
-webkit-line-clamp: 2; // controls the display lines of text
-webkit-box-orient: vertical; // set the object sub-element telescopic cartridge arrangement
}
If you label in English, English is not automatically wrap, so you need to get the English word wrap, add the code
word-wrap:break-word;
word-break:break-all;