1.单行:外部容器应加overflow: hidden;否则不显示省略号
.text {
font-size: 38rpx;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
2.多行
.text {
font-size: 38rpx;
line-height: 38rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
word-break: break-all;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}