Answers for "change svg background image color"

CSS
4

set svg background color css

/* You can use CSS masks, With the 'mask' property, you create a mask that is applied to an element. */
background-color: red;
-webkit-mask-image: url(icon.svg);
mask-image: url(icon.svg);
Posted by: Guest on January-11-2021
0

background image svg change fill color

If you are trying to use and SVG directly on CSS with url() like this;

a:before {
  content: url('data:image/svg+xml; utf8, <svg xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 451 451"><path d="M345.441,2...

You should encode the # to %23, otherwise it won't work.

<svg fill="%23FFF" ...
Posted by: Guest on March-04-2022

Code answers related to "change svg background image color"

Browse Popular Code Answers by Language