EKsumic's Blog

let today = new Beginning();

Click the left button to use the catalog.

OR

[SVG] How to draw a circle?

Code:

<svg>
   <circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="transparent" />
</svg> 
  • "cx" and "cy" are used to determine the position of the center of the circle.
  • "r" is used to determine the radius of the circle.
  • "stroke" is used to determine the color of the edge of the circle.
  • "stroke-width" is used to determine the thickness of the edge of the circle.
  • "fill" is used to determine the color filled in the circle.

Here is what the above code looks like in HTML5:

   

You can accurately see that this is a circle with a center at (100, 50) and a radius of 40. It is a black circle with a thickness of 2 and the filling is transparent.

Next: [SVG] How to draw a rectangle?

This article was last edited at 2020-12-09 11:37:25

* *