Say you have a line in 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.
Login to add comment
Other posts in this group

Some weekend reading on the heels of Global Accessibility Awareness Day (GAADM), which took place yesterday. The Email Markup Con

Hey, isn't there a fairly new CSS feature that works with scroll regions? Oh yes, that's Scroll-Driven Animations. Shouldn't that mean we can trigger an animation while scrolling through the items


I know, I know: there are a ton of content management system options available, and while I've tested several, none have really been the one, y'know? Weird pricing models, difficult customization,


Okay, nobody is an exaggeration, but have you seen the stats for hwb()
? They show a steep decline, and after working a lot on color in the CSS-Tricks almanac, I’ve just been wondering
