muunala10221
V2EX  ›  问与答

请教一个 SVG 问题关于 fill 和 color 属性

  •  
  •   muunala10221 · Oct 13, 2021 · 568 views
    This topic created in 1696 days ago, the information mentioned may be changed or developed.
    我把一个 svg 通过 AI 编辑断开链接后上传到了 iconfont (不断开链接上传后显示空白),我下载下来后可以正常使用,但却无法设置 fill 属性,color 可以生效。

    例如一个锤子的 svg,上传前我可以通过 fill 和 color 分别设置锤头和把手不同的颜色,但我上传后却只有 color 生效 fill 不生效,color 改的也是整体的,我也去 iconfont.js 里面设置了 currentColor 也在 iconfont 上面去除了颜色 ,我不太明白为什么会这样,麻烦指教一下
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2814 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 01:24 · PVG 09:24 · LAX 18:24 · JFK 21:24
    ♥ Do have faith in what you're doing.