Web Design

How stroke-dasharray Patterns Work

July 15, 2022
How stroke-dasharray Patterns Work

Say you have a line in SVG:

<svg<line x1="0" y1="30" x2="500" y2="30" stroke-color="#f8a100" /</svg

You can use the stroke-dasharray property in CSS to make dashes:

line {
  stroke-dasharray: 5;
}

That 5 value is a relative unit based …


How stroke-dasharray Patterns Work originally published on CSS-Tricks. You should get the newsletter.

Read More

Our latest news

Read the latest news, articles and tips from Add On IDX

Want to learn more?

Signup