- object.svg
- style.css
SVG
<svg width="300" height="200">
<line x1="40" y1="50" x2="260" y2="50" stroke-width="10" stroke="tomato"></line>
<line x1="40" y1="100" x2="260" y2="100" stroke-width="20" stroke="gold"></line>
<line class="shape-dasharray" x1="40" y1="150" x2="260" y2="150" stroke-width="20" stroke="lightseagreen"></line>
</svg>
CSS
svg {
border: 1px solid #dddddd;
}
You’ve gone to a different page
Goalscompleted
0
- Assign the attribute
stroke-dasharray="10"
to the first line, - and then assign the value
50 15
to the second line. - In the CSS, assign the value
5 10 15 20
to thestroke-dasharray
property for the third line.
Comments