Slides created by Ira Litvinchuk
There is one overpowered element in SVG, that would be the element < path >
The element takes this sequence of drawing commands through the attribute d.
(A)
(Q)
(C)
CSS
Native
JS
stroke-dasharray
& stroke-dashoffset
.path {
stroke-dasharray: 320;
stroke-dashoffset: 0;
animation: dash 5s linear;
}
@keyframes dash {
from {
stroke-dashoffset: 320;
}
to {
stroke-dashoffset: 0;
}
}
.line1 {
stroke-dasharray: 340;
stroke-dashoffset: 40;
animation: dash 2.5s linear alternate infinite;
}
.line2 {
stroke-dasharray: 320;
stroke-dashoffset: 320;
animation: dash2 2.5s linear alternate infinite;
}
@keyframes dash {
from {
stroke-dashoffset: 360;
}
to {
stroke-dashoffset: 40;
}
}
@keyframes dash2 {
from {
stroke-dashoffset: 280;
}
to {
stroke-dashoffset: -40;
}
}
Animation is done by manipulating the attributes of shapes over time. This is done using one or more of the 4 SVG animation elements.
Animation is achieved by nesting one or more of the following elements inside the element that needs animation.
Animates an attribute
Animates motion along a path.
Animates the transform attribute of a shape.
AnimatesTransform type="scale".
Synchronize beginning of one animation to end of another
Fine tune the interactivity
How to get from this