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:
- 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
Post a Comment