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

Daniel Garcia
Daniel Garcia
12,877 Points

Choppy Animation in FireFox

I'm using firefox to create the line animation in the video, but instead of displaying as a smooth sequence of a line being drawn, it starts out drawing a small portion of the path, pauses, then a huge chunk appears, pauses again, then the rest of the path appears and then fills. How do you get around this in firefox?

Here's my code

/* -------------------------- Keyframes --------------------------- */

@keyframes offset { 100% { stroke-dashoffset: 0; } }

@keyframes fill-it { 100% { fill: #6fbc6d; } }

/* -------------------------- SVG Styles --------------------------- */

svg { display: block; margin: 2em auto 0; width: 40%; }

.logo { stroke: #6fbc6d; stroke-width: 2; stroke-dasharray: 810; stroke-dashoffset: 810; animation: offset 5s linear forwards, fill-it .8s 5s forwards; }

Taylor Espejo
Taylor Espejo
3,939 Points

does it have something to do with the fact you're using dashes ?

forgive me its hard to tell from the code alone.