css control exceeds width... show
1. When one line:
div{
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap
}
2. When there are multiple lines:
div{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
As shown in the figure:
Of course, it is OK to use string interception, but css is relatively more convenient.