首页 > 解决方案 > 如何让 SVG 圆圈填满整个盒子?

问题描述

我在 SVG 中有这个圆圈:

<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="532" height="532" viewBox="0 0 512 512">
    <circle cx="255" cy="255" r="230" fill="{c}" />
    <text x="255" y="246" alignment-baseline="central" text-anchor="middle" fill="#fff" font-size="275" font-weight="300" font-family="Roboto">{x}</text>
</svg>

我需要这个用于字体生成器,并且我想删除外部和圆圈之间的空间,以便我得到一个没有任何空间的 PNG。我怎样才能做到这一点?

标签: htmlsvg

解决方案


推荐阅读