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

Extra Credit Tugboat Animation Nuance

I'm doing the Extra Credit for the Animation part of CSS Foundations, and can't help but notice that in FF and IE10 that the mike-float animation rocks Mike forwards only (right, than back to middle, repeat), rather than back and forth (right, to middle, to left, to middle, repeat)as in Chrome. Is this a nuance in the way the browsers interpret the keyframes or is there a problem in my code?

.mike {
-webkit-animation: mike-move 6s 6s ease-out forwards,
                   mike-float 3.2s infinite;
-moz-animation: mike-move 6s 6s ease-out forwards,
                   mike-float 3.2s infinite;
-o-animation: mike-move 6s 6s ease-out forwards,
                   mike-float 3.2s infinite;
animation: mike-move 6s 6s ease-out forwards,
                   mike-float 3.2s infinite;
}

@-webkit-keyframes mike-float {
50% { -webkit-transform: rotateZ(5deg) translateY(-5px); }
}

@-moz-keyframes mike-float {
50% { -moz-transform: rotateZ(5deg) translateY(-5px); }
}

1 Answer

I got it! In main.css, I needed to also forgotten to update the vendor prefixes for the .mike selector

.mike {
 width: 180px;
position: absolute;
top: 55%;
left: -15%;
-webkit-transform: rotateZ(-5deg);
-moz-transform: rotateZ(-5deg);
-o-transform: rotateZ(-5deg);
transform: rotateZ(-5deg);
}