如何使用Nginx让网站快速置灰

  1. 查看当前编译的版本是否支持http_sub_module模块,如果不支持需要重新编译增加此模块。
nginx -V
  1. 修改nginx.conf配置,在http{}中增加以下两行。
http {
    sub_filter  '</head>'  '<style type="text/css">html {-webkit-filter: grayscale(.95);}</style></head>';
    sub_filter_once on;
     …(省略其它输出)
}
已邀请:

感谢分享,已经加灰了

要回复问题请先登录注册