项目需求:文字显示最多两行,超过就省略号...展示。
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2; //控制的文本行数
-webkit-box-orient: vertical;
问题就是浏览器编译之后-webkit-box-orient: vertical 消失了
解决方法就是在css文件中-webkit-box-orient: vertical上方添加 /* autoprefixer: ignore next */
/* autoprefixer: ignore next */
-webkit-box-orient: vertical;