Grayscale image with CSS on Safari 5.x

后端 未结 4 1811

I am trying to show some images on a page where they should be shown in grayscale, except on mouse hover when they smoothly transition into color. I\'ve ma

4条回答
  •  时光说笑
    2020-12-30 12:14

    This is something like that:

    .grayscale {    
       filter: url(css/grayscale.svg#greyscale);    
       -webkit-filter: grayscale(1);    
       -moz-filter: grayscale(100%);    
       -ms-filter: grayscale(100%);    
       -o-filter: grayscale(100%);    
    } 
    

    You need to download the svg file either.

提交回复
热议问题