兜兜转转,回归初恋,欢迎使用yusiyuhuo主题, 主题介绍>>>

css实现网站整体变灰(兼容火狐)

WordPress建站 陌小雨 3818℃ 0评论

天下兴亡,匹夫有责。有时候我们可能需要将网站整体变灰,实现方法也很简单。将下面代码加入到wordpress主题目录下的style.css文件中即可:

/* 网站变灰代码 */  
html{   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 id='grayscale'><feColorMatrix type='matrix'values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.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);  -webkit-filter: grayscale(1);}

赶快试试吧!

转载请注明:小雨科技 _武汉网站建设_武汉小程序搭建 » css实现网站整体变灰(兼容火狐)

喜欢 (0)
发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址