overflow:hidden !important;
white-space: nowrap !important;
text-overflow: ellipsis !important;
word-wrap: normal !important;
识别换行符:
white-space: pre-wrap;
// line-height: 1.5
代码:
word-break: break-all;
display: -webkit-box;
text-overflow: ellipsis;
overflow: hidden;
-webkit-line-clamp: 1;
/* autoprefixer: ignore next */
-webkit-box-orient: vertical;
-webkit-box-orient: vertical 属性编译后丢失问题详解
解决方案一:
/* autoprefixer: off*/
-webkit-box-orient: vertical;
/* autoprefixer: on*/
不忽略了,但是会报警告 如下:
解决方案二:
/* autoprefixer: ignore next */
-webkit-box-orient: vertical;
问题完美解决,也不报警告。
方案三:
在html写内联样式
方案四:
更改webpack配置
方案三和四请参考:
https://blog.csdn.net/weixin_41544124/article/details/92646582