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

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);
}