问题
在taro 小程序项目中,使用多行文字溢出展示… 时,发现 css 不起作用,排查问题发现-webkit-box-orient: vertical;样式在打包后,没有出现在样式表中
产生原因
解决
方案一:添加注释
① /* autoprefixer: (on|off) */ (注:taro 编译会『⚠️ 编译警告 .』)
/* autoprefixer: off */-webkit-box-orient: vertical;/* autoprefixer: on */
② /* autoprefixer: ignore next */
/* autoprefixer: ignore next */-webkit-box-orient: vertical;
方案二:将 -webkit-box-orient 样式写为内联样式
方案三:关闭autoprefixer移除功能
autoprefixer: {remove: false}
