Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS Animating SVG with CSS Keyframe and Line Drawing Animations Animating stroke-dasharray and stroke-dashoffset

Edgar Gil
Edgar Gil
13,322 Points

Something II Notice stroke-dasharray finding the perfect length.

At video 2:10 Teacher Guil Hernandez mention. How to find the length of the stroke-dasharray.

We found out it was stroke-dasharray: 810;

But i found this and i got the same result 810;

on the index.html file Line 8 that we got this

<svg xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="210.7 336.7 125 135" width="340px">

If you add the first number and skip the second number and add the rest of the number we get 810. Is this coincidence?

210.7 + 125 + 135 + 340 = 810.

NOTE: Remove any decimal. 210.7 -> 210

210 + 125 + 135 + 340 = 810.

I would like to know this just to avoid using javascript to find the length for me.