react项目中关于css样式-webkit-box-orient: vertical
代码中有此样式,项目跑起来后发现此属性丢失
.name{
font-size: 14px;
height: 36px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical ;
}

解决方法:在此行代码前加如下注释 /*! autoprefixer: off */
.name{
font-size: 14px;
height: 36px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
/*! autoprefixer: off */
-webkit-box-orient: vertical ;
}
本文介绍了解决React项目中CSS样式-webkit-box-orient:vertical丢失的问题。通过在样式声明前添加注释/*!autoprefixer:off*/来禁用autoprefixer,确保了样式能够正确应用。
2万+

被折叠的 条评论
为什么被折叠?



