Modify SVG fill color when being served as Background-Image

后端 未结 16 1205
再見小時候
再見小時候 2020-11-22 06:31

Placing the SVG output directly inline with the page code I am able to simply modify fill colors with CSS like so:

po         


        
16条回答
  •  耶瑟儿~
    2020-11-22 07:18

    Use the sepia filter along with hue-rotate, brightness, and saturation to create any color we want.

    .colorize-pink {
      filter: brightness(0.5) sepia(1) hue-rotate(-70deg) saturate(5);
    }
    

    https://css-tricks.com/solved-with-css-colorizing-svg-backgrounds/

提交回复
热议问题