This page cannot be displayed because your browser does not support scroll-driven animations with CSS.
Open this page in Chrome on desktop.
Or
Watch this summary as a video on YouTube:
Back to HomeThis page cannot be displayed because your browser does not support scroll-driven animations with CSS.
Open this page in Chrome on desktop.
Watch this summary as a video on YouTube:
Back to HomeThis page shows an interactive slide deck that is currently not responsive. Resize your browser window to at least 770px wide and 650px tall.
This means you can generate an SVG from React or any other frontend library.
width
and height
attributes and its coordinate system with the viewBox
attribute. 0,0
. We can define a circle by setting its center coordinates, cx
and cy
, and
its radius, r
.
To change its color, we can set the fill
attribute. We can use any value
that’s valid in CSS.
To set the border color and width, we can use the stroke
and stroke-width
attributes.
x
and y
, and the size with width
and height
. path
element. d
attribute of a path consists of segments. Here, we have a Move-to and a Line-to segment. We set a coordinate for both. viewBox
property. path
. id
to this path, reuse it with the use
element, and rotate
it into position. g
element. <svg width="450" height="450" > <path d="M 100 350Start Position Q 225 50Control Point 350 350End Position "
stroke="#fa3838" stroke-width="20" fill="none" /></svg>
The quadratic bezier curve has one control point that defines how to bend the line. Drag the coordinates to see how the code changes.
<svg width="450" height="450" > <path d="M 100 350Start Position C 70 100Control Point 1 380 100Control Point 2 350 350End Position "
stroke="#fa3838" stroke-width="20" fill="none" /></svg>
A cubic bezier curve has two control points, giving you much greater flexibility.
<svg width="450" height="450" > <path d="M 145 174Start Position A 150Radius X 120Radius Y 20Rotation 0Large Arc Flag 0Sweep Flag 288 314End Position "
stroke="#fa3838" stroke-width="20" fill="none" /></svg>
Arcs are one of the most complicated path segments. Click here to read more about them.