svg【一】绘制三角形

368 阅读1分钟

path 绘制

<svg height="210" width="400">
    <path d="M150,0 L75,200 L225,200 Z" style="fill:lime;stroke:purple;stroke-width:1" />
</svg>

polygon 绘制

<svg height="210" width="400">
    <polygon points="150,0 75,200 225,200" style="fill:lime;stroke:purple;stroke-width:1" />
</svg>

效果图

image.png