Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

在特殊纪念日时,我们需要将网站变为灰色,只需要在<head></head>之间插入以下代码:

以wordpress为例,在主题设置或者站点配置里面的插入代码区域,插入下面的代码即可

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<style>
html { filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); }
</style>
<style>
html{
filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
-ms-filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: url(“data:image/svg+xml;utf8,<svg xmlns=\”http://www.w3.org/2000/svg\”><filter ….3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\”/></filter></svg>#grayscale”);
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
filter: gray;
-webkit-filter: grayscale(1);
}
</style>

评论