Previous: [SVG] How to draw a rectangle?
Code:
<svg height="210" width="500">
<polygon points="200,10 250,190 160,210"
style="fill:lime;stroke:yellow;stroke-width:1"/>
</svg>
Here is what the above code looks like in HTML5:
- If you have noticed, we did not define the width and height of the previous svg, and its default value is 300*150.
- And this time we must define the width and height of the svg, because the polygons we draw cannot be fully displayed. We must define an area that can accommodate polygons. The default value of 300*150 is obviously not what we want. So we defined 210*500.
Today's comments have reached the limit. If you want to comment, please wait until tomorrow (UTC-Time).
There is 18h41m45s left until you can comment.