SVG Circles in HTML
Here's a quick tutorial that will teach you how to create a circle with HTML's
viewBox="0 0 1000 200">
<circle cx="500" cy="100" r="75"
Here are the attributes used to define our circle:
- cx & cy: The x and y coordinates of the center of the circle.
- r: The radius of the circle, relative to the site of the viewbox.
- stroke: The color of the border line. This value can be defined either by specifying a hexadecimal color code as we did above or by using a valid color name.
- stroke-width: The width of the border line output to the screen, relative to the size of the viewbox.
- fill: The fill color can also be defined as a hexadecimal color code or color name and will fill the circle with the color specified. Specifying a value of none will keep the circle fill color transparent.
- opacity: Determines if the circle will have any transparency. Valid decimal values can be between 0.0 (invisible) and 1.0 (fully visible). A value of 0.5 would give the circle 50% transparency.
Other SVG Paths & Shapes
Created: April 08, 2022
There are no comments yet. Start the conversation!