text-overflow: -o-ellipsis-lastline;
overflow: hidden;text-overflow:
ellipsis;display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
想显示几行写几
-webkit-line-clamp: 2;
一行的话可以这样写:
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
效果图: