Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

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.