html - 如何让 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。我怎样才能做到这一点?
解决方案
推荐阅读
- python - 在 127.0.0.1 上使用客户端和服务器进行 Python3 套接字编程工作 - 在 LAN 中的不同节点上不起作用 - 为什么?
- nestjs - 如何将 TypeORM 存储库暴露给 NestJS 中的其他模块
- django - get() 得到了一个意外的关键字参数“pk_news”
- javascript - React State如何将元素(不是单个元素)不可变地添加到javascript Set(不是Array)
- javascript - React Router Docs & Redirect vs history.push()
- python - JSONDecodeError:应用带有json的函数时,期望用双引号括起来的属性名称
- ios - Swift - 仅在我关闭应用程序后切换更新
- amazon-web-services - 是否可以在 AWS 中为 Lambda 函数配置可用区(AZ)?
- javascript - 使用函数和 if 语句的 JavaScript 表单验证
- javascript - 如何在按下按钮时更改视频