How to change SVG's path color?

前端 未结 3 1818
生来不讨喜
生来不讨喜 2021-01-12 19:11

Update: Yes, I know there are similar questions on SO, but the solutions don\'t work either.

I want to change SVG\'s color, I mean paths\'s color, n

3条回答
  •  感动是毒
    2021-01-12 19:29

    What happens here is that the object is not a simple path, but actually the whole "stroke" has been transformed into a big object. This may happen when you export objects with fancy (or not so fancy) brush settings from various drawing applications. You can also get the same result with the Outline feature in Adobe Illustrator, IIRC.

    To avoid this, edit the original object in its original illustration software and try the following:

    1. Use a simple stroke, and no brush. This may work.
    2. Use no stroke in the original editor and apply it with JS or CSS in the SVG.

提交回复
热议问题