1.css
span{
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
2.在浏览器中没生效,审查元素也没有此样式,后经查看原来是autoprefixer的问题。
span{
text-overflow: ellipsis;
overflow: hidden;
display: -webkit-box;
/* autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}