[英]how to make a shape in svg or with figma
This is the image which I need to create.这是我需要创建的图像。
I need to make this image with svg or with figma in png format.我需要用 svg 或 png 格式的 figma 制作这张图片。 the black portion will be transparent.
黑色部分将是透明的。 please help me.
请帮我。 thanks
谢谢
You can create a rectangle that is masked off by a circle.您可以创建一个被圆圈 遮盖的矩形。
body { background-color: silver; }
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="200"> <defs> <mask id="m1"> <rect width="100" height="100" fill="white" /> <circle r="100" fill="black"/> </mask> </defs> <rect width="100" height="100" fill="white" mask="url(#m1)"/> </svg>
This is a very simple path.这是一条非常简单的路径。
M 0 100
Move to (0, 100) (bottom left)移动到 (0, 100)(左下角)
H 100
Horizontal line to bottom right右下角的水平线
V 0
Vertical line to top right右上角竖线
A 100 100 0 0 1 0 100
Semicircular arc of radius 100, clockwise, to (0, 100) (bottom right).半径为 100 的半圆弧,顺时针方向,到 (0, 100)(右下角)。
Z
Close path关闭路径
svg { width: 200px; }
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"> <path d="M 0 100 H 100 V 0 A 100 100 0 0 1 0 100 Z" fill="black"/> </svg>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.