0

I embedded an SVG file as object as follows

<object type="image/svg+xml" data="img/icon-info.svg" id='ree' style="width:20px;height:20px;">

I did the styling inside the SVG file as follows:

 <style type="text/css">
    <![CDATA[
        g {
            fill: red;
            stroke: blue;
            stroke-width: 3
        }
    ]]>
</style>

My question now is, how do I change its color/fill by hovering over the embedding object in the Html file?

Paulie_D
  • 107,962
  • 13
  • 142
  • 161
Dummy
  • 373
  • 1
  • 2
  • 11
  • Not sure you can TBH – Paulie_D Oct 13 '17 at 12:08
  • Not sure what you mean with TBH – Dummy Oct 13 '17 at 12:08
  • To Be Honest is what TBH means - And the answer is kinda - See https://stackoverflow.com/questions/4906148/how-to-apply-a-style-to-an-embedded-svg – Paulie_D Oct 13 '17 at 12:09
  • put g:hover styling in the styling inside the SVG file. – Robert Longson Oct 13 '17 at 12:56
  • When I put the hover inside the SVG file, the hover effect will only invoked when there is hovering over the outlines of the image. Empty spaces will not invoke the hover. That's why I like the hover effect to be invoked when hovering over the object – Dummy Oct 13 '17 at 13:12

0 Answers0