--- title: path slug: Web/SVG/Element/path tags: - SVG - SVG图形 - 元素 - 参考 translation_of: Web/SVG/Element/path ---
path元素是用来定义形状的通用元素。所有的基本形状都可以用path元素来创建。
{{svginfo}}
<svg width="100%" height="100%" viewBox="0 0 400 400"
xmlns="http://www.w3.org/2000/svg">
<path d="M 100 100 L 300 100 L 200 300 z"
fill="orange" stroke="black" stroke-width="3" />
</svg>
输出结果:
{{EmbedLiveSample("Example",200,215)}}
该元素实现了SVGPathElement
接口。