.title{ overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; flex-direction: column; }
vue项目编译或打包后,发现没有-webkit-box-orient: vertical
解决:
在css中前后添加注释:
/*! autoprefixer: off */ -webkit-box-orient: vertical; /* autoprefixer: on */
转载请注明:前端录»多行文本后隐藏