Svg part 3

Drawing a Circle



To draw shapes with SVG, you first need to create an SVG element tag with two attributes: width and height.<svg width="1000" height="1000"></svg>
To create a circle, add a <circle> tag:
<svg width="2000" height="2000">
<circle cx="80" cy="80" r="50" fill="green" />
</svg>
Try It Yourself

cx pushes the center of the circle further to the right of the screen
cy pushes the center of the circle further down from the top of the screen
r defines the radius
fill determines the color of our circle
stroke adds an outline to the circle

Result:
Every element and every attribute in SVG files can be animated.

Comments

Popular posts from this blog

Drag&Drop API