设置成百分之百直接过滤成灰色:

img{filter:gray; 
  filter:grayscale(100%); 
  -0-filter:grayscale(100%); 
  -moz-filter:grayscale(100%); 
  -webkit-filter:grayscale(100%); 
}

可以通过设置具体百分数值来定义需求:

img{filter:gray; 
  filter:grayscale(60%); 
  -0-filter:grayscale(60%); 
  -moz-filter:grayscale(60%); 
  -webkit-filter:grayscale(60%); 
}

 

相关文章:

  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-17
  • 2022-12-23
  • 2022-02-04
  • 2022-12-23
  • 2022-01-16
  • 2022-01-11
  • 2022-12-23
相关资源
相似解决方案