如何使用Nginx让网站快速置灰
- 查看当前编译的版本是否支持http_sub_module模块,如果不支持需要重新编译增加此模块。
nginx -V
- 修改nginx.conf配置,在http{}中增加以下两行。
http {
sub_filter '</head>' '<style type="text/css">html {-webkit-filter: grayscale(.95);}</style></head>';
sub_filter_once on;
…(省略其它输出)
}
没有找到相关结果
已邀请:
1 个回复
刘老九
感谢分享,已经加灰了