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

Alex Oates
Alex Oates
7,171 Points

Line animation fill won't work with safari?

I've managed to get it all working in Chrome, but Safari doesn't render the fill, the actual line animation is working, but when it gets to the fill at the end it just defaults to #000. I've looked through web inspector and can't see anything causing this under computed rules.

Please help!

Julie Myers
Julie Myers
7,627 Points

Could you post both your html and css coding?

Alex Oates
Alex Oates
7,171 Points

EDIT:

SO i've found its the <a></a> tag wrapped around the SVG causing the issue. But can't find anything in my CSS that would cause the fill to change solid #000.

Alex Oates
Alex Oates
7,171 Points

Ok, i've figured it out. I had to wrap the SVG's path in anchor tags, not the SVG. Now all works as expected.

Though if someone could explain why this happens i'd really appreciate it!