vue|vue 打包上线后 css3渐变属性丢失的问题解决方案

【vue|vue 打包上线后 css3渐变属性丢失的问题解决方案】网上搜索了很多解决方案,最后找到个类似的,可能是optimize-css-assets-webpack-plugin这个插件的问题,其实解决办法很简单,只需要在这个属性前后加一个特殊注释即可,

.score_view { /*! autoprefixer: off */ background: -webkit-gradient(linear, center bottom, center top, from(#146b22), to(#54e475)); background: -webkit-linear-gradient(bottom,#146b22,#54e475); /* autoprefixer: on */ background: -moz-linear-gradient(bottom,#146b22,#54e475); background: -o-linear-gradient(bottom,#146b22,#54e475); background: linear-gradient(bottom,#146b22,#54e475); }.publish { /*! autoprefixer: off */ background: -webkit-gradient(linear, 100% 0, 0 0, from(rgba(231,70,78,0.9)), to(rgba(255,120,130,0.9))); background: -webkit-linear-gradient(left,rgba(231,70,78,0.9), rgba(255,120,130,0.9)); /* autoprefixer: on */ background: -moz-linear-gradient(left,rgba(231,70,78,0.9), rgba(255,120,130,0.9)); background: -o-linear-gradient(left,rgba(231,70,78,0.9), rgba(255,120,130,0.9)); background: linear-gradient(left,rgba(231,70,78,0.9), rgba(255,120,130,0.9)); }

    推荐阅读