0 added
0 removed
Original
2026-01-01
Modified
2026-03-09
1
<p>In SVG, you can control the appearance of dashed lines by using the stroke-dasharray attribute. The length of the lines and the spaces between them is assigned as the value. You can specify one number. In this case, you get a dashed line consisting of lines and spaces of the same length:</p>
1
<p>In SVG, you can control the appearance of dashed lines by using the stroke-dasharray attribute. The length of the lines and the spaces between them is assigned as the value. You can specify one number. In this case, you get a dashed line consisting of lines and spaces of the same length:</p>
2
<p>1. stroke-dasharray="15":</p>
2
<p>1. stroke-dasharray="15":</p>
3
<p>2. If you set two numbers stroke-dasharray = "50 10", the first will control the length of the lines, and the second will control the length of the spaces:</p>
3
<p>2. If you set two numbers stroke-dasharray = "50 10", the first will control the length of the lines, and the second will control the length of the spaces:</p>
4
<p>3. The sequence can be continued: stroke-dasharray = "1 2 3 5 8 13 21". In this case, you get a dashed line with a complicated rhythm:</p>
4
<p>3. The sequence can be continued: stroke-dasharray = "1 2 3 5 8 13 21". In this case, you get a dashed line with a complicated rhythm:</p>
5
<p>The CSS property stroke-dasharray works in the same way.</p>
5
<p>The CSS property stroke-dasharray works in the same way.</p>