Skip to content

[Feature] SVG 只能显示部分,还有部分不能显示 #20204

@mynewbaby888

Description

@mynewbaby888

What problem does this feature solve?

作者, 请问svg只能显示部分,怎么弄都显示不了全部,这怎么解决
svg 如下,只能显示第一个rect 后面2个不能显示,这个怎么解决,好像用xlink:link 都会有这个问题,显示不了,如果改掉这个,直接贴重复的代码,而不是引用,就可以显示出来,但是这样太麻烦了

svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 21.05 19.08">defs>
linearGradient id="a" x1="20.76" y1="0.54" x2="17.26" y2="0.54" gradientUnits="userSpaceOnUse">
stop offset="0" stop-color="#738156"/>
/linearGradient>
linearGradient id="c" x1="3.76" y1="18.54" x2="0.26" y2="18.54" xlink:href="#a"/>
/defs>
rect x="17" width="4.05" height="1.08" style="fill:url(#a)"/>
rect y="11" width="4.05" height="1.08" style="fill:url(#b)"/>
rect y="18" width="4.05" height="1.08" style="fill:url(#c)"/>/svg

What does the proposed API look like?

怎么才能解决全部显示svg 谢谢

Metadata

Metadata

Assignees

No one assigned

    Labels

    SVGbugmissing-demoThe author should provide a demo.pendingWe are not sure about whether this is a bug/new feature.waiting-for: author

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions