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!

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

Issue with CSS animation

Heya guys, I hope you are great.

I'm having issues with the animation below, specifically in the PHP bar with the 7%, the animation keeps moving and then goes back to 7%.

Also, if you see any other mistake please feel free to let me know.

http://codepen.io/ibby/pen/ClIJp

Thanks a lot for your help in advance.

3 Answers

Sebastian Wilson
Sebastian Wilson
15,710 Points

I changed

@-webkit-keyframes slide-css { 0% { width: 0%; } 20% { width: 20%; } }

to

@-webkit-keyframes slide-css { 0% { width: 0%; } 20% { width: 0%; } }

Elliott Frazier
PLUS
Elliott Frazier
Courses Plus Student 9,647 Points

Sebastian Wilson fixed the problem, but you do know that all of your elements you want animated are tied to the slide-css animation name, therefore makes the other animation properties unneeded. Awesome design though!

Hey Elliott Frazier, thanks so much for the help. I'll try to fix it asap.

Thanks!

Mike Morales
Mike Morales
19,833 Points

CSS code:

.jquery { -webkit-animation-name: slide-css; -webkit-animation-duration: 2s; -webkit-animation-timing-function: linear;
}
should you change the slide-css to slide-jquery?

.jquery { -webkit-animation-name: slide-jquery; -webkit-animation-duration: 2s; -webkit-animation-timing-function: linear;
}