Alex Torres Alex Torres - 7 months ago 11
HTML Question

Captain America with svg

How I can do this star right with svg? I must use svg and I try with points but not work. I mustn't use element path. Thanks.



<!DOCTYPE html>
<html>
<body>

<svg width="100" height="100">

<circle cx="50" cy="50" r="45" fill="white" stroke="red" stroke-width="10" />

<circle cx="50" cy="50" r="30" stroke="red" stroke-width="10" fill="blue" />

<polygon points="50,25 30,80 75,40 25,40 70,70" style="fill:white;"/>

</svg>

</body>
</html>




Answer

This seems a bit closer.

<!DOCTYPE html>
<html>
<body>

<svg width="100" height="100">
 
<circle cx="50" cy="50" r="45" fill="white" stroke="red" stroke-width="10" />
  
  <circle cx="50" cy="50" r="30" stroke="red" stroke-width="10" fill="blue" />
  
 <polygon points="50,25 35,70 75,40 25,40 65,70" style="fill:white;"/> 
  
</svg> 
 
</body>
</html>