modify stroke and fill of svg image with javascript

前端 未结 5 1636
臣服心动
臣服心动 2020-12-24 03:37

I am trying to modify the stroke and fill of an .svg image. I have been getting some information from Is it possible to manipulate an SVG document embedded in an HTML doc wi

5条回答
  •  清歌不尽
    2020-12-24 04:02

    If you use an img tag then for security reasons you will not be able to access the DOM of the image data. The image is effectively the same as an animated bitmap as far as the container is concerned.

    Using an