How to make a diamond shape using the <svg> element?
P粉043295337
2023-08-26 12:41:30
<p>I'm trying to create a diamond using the <code><svg></code> and <code><polygon></code> HTML5 elements. I specified the point, but instead of being filled into a rhombus, it was filled into a pair of triangles. This is my approach: </p>
<p>
<pre class="brush:html;toolbar:false;"><div>
<svg width="2000" height="2000">
<polygon points="25 25, 75 25, 50 50, 50 0" style=" fill: blue; stroke:black;"/>
</svg>
</div> </pre>
</p>
I hope you like it