vue开发后打包部署的网站页面变灰色

2023-01-12 15:10:44 浏览数 (1)

vue开发后打包部署的前端页面变灰色,只需要找到index.html文件,加入一段css代码即可;

代码语言: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标签前面添加一段代码:

代码语言:txt复制
<style>html { filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
    -webkit-filter: grayscale(90%);}</style>

0 人点赞