vue开发后打包部署的前端页面变灰色,只需要找到index.html文件,加入一段css代码即可;
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="chrome=1,IE=edge"><meta name=description content=新时代><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1"><title>新时代</title><script>// document.addEventListener('DOMContentLoaded', function() {
// document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
// })</script><style>html { filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
-webkit-filter: grayscale(90%);}</style><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script>/*BAIDU_STAT*/</script><script src=/static/js/chunk-vendors.3d0c485b.js></script><script src=/static/js/index.173ccffe.js></script></body></html>
在head标签里面的link标签前面添加一段代码:
<style>html { filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
-webkit-filter: grayscale(90%);}</style>