SVG feColorMatrix doesn't work in safari

前端 未结 1 853
清歌不尽
清歌不尽 2020-12-19 12:18

I have a fairly simple setup where I want to alter the color of the svg image by using an svg filter:


  

        
相关标签:
1条回答
  • 2020-12-19 12:26

    So, this is going to seem silly - but it's the initial linebreak in your filter that's throwing it off. Correcting it to:

    <feColorMatrix type="matrix"
                   values="0 0 0 0 0
                           0 0 0 0 0.68
                           0 0 0 0 0.94
                           0 0 0 1 0
                           "
                   />
    

    ... works perfectly. (Incidentally, at one point, IE couldn't handle linebreaks in the values array in any position - you had to put them all on one line.)

    0 讨论(0)
提交回复
热议问题