0

I am trying to create a triangle (polygon element) using svg. Is it possible to give it a rounded corners?

I am thinking about using the same option as in this case (https://www.w3schools.com/graphics/svg_rect.asp) in example 4, but I am not sure how to do it.

zosia
  • 1
  • 1

1 Answers1

0

Its solution is shown here. stackoverflow.com/questions/10177985/svg-rounded-corner

First of all, you should do your research. But the solution is as follows.

<svg width="440" height="440">
  <path d="M100,100 h200 a20,20 0 0 1 20,20 v200 a20,20 0 0 1 -20,20 h-200 a20,20 0 0 1 -20,-20 v-200 a20,20 0 0 1 20,-20 z" fill="none" stroke="black" stroke-width="3" />
</svg>

Also, if you want to practice live, visit this page. plnkr.co/edit/kGnGGyoOCKil02k04snu?preview

0x4nt
  • 24
  • 4