-2

How can i change the background color of svg place in html object element .Using CSS ,Jquery or Javascript my svg image is collected from an extended source in django static file

html

<object  id="object" type="image/svg+xml" data="{% static 'images/icons/Businessopportunities.svg' %}"></object>
Scofield
  • 91
  • 1
  • 9
  • 1
    [How much research effort is expected of Stack Overflow users?](https://meta.stackoverflow.com/a/261593/3082296) – adiga Nov 11 '17 at 20:32

1 Answers1

1

You have to open your web console and inspect the svg image. Find the element that you want to change the color of and then open the svg image in your preferred code editor, find the element again and assign a custom class to it.

Style that class ass normal in your css file.

As you don't provide the image you want to colorize, I cannot help you further on this. If you don't manage to make this, please provide the code of your image and tell us, what should be colorized.

Sam
  • 87
  • 1
  • 9
  • Look at my html code .You will see that the image is being collected from a source .Using django static file – Scofield Nov 11 '17 at 20:35
  • Yes, I saw this, but that does not help, we have no code of the actual image. As you maybe know, `svg` images are made up of `html` code, so you can open them in your text editor and assign classes to some elements inside it. It's that code that you have to inspect, to find the element you want to colorize by `css` or `js`. If you add a class or an id to it, you can simply refer to it. – Sam Nov 11 '17 at 20:42
  • 1
    Actually, svg is based on XML and therefore not really html, but has the same syntax / structure and can be embedded in html. – frontend_dev Nov 11 '17 at 21:09
  • @frontend_dev That's absolutely correct. I apologize for the inaccurate or even slightly wrong choice of words. – Sam Nov 11 '17 at 21:16
  • No prob, did not want to nitpick, but thought this should be clarified ;) – frontend_dev Nov 11 '17 at 21:24
  • Yes, absolutely! – Sam Nov 11 '17 at 21:24