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

Ful page animation

trying to get my steamboat to puff smoke up. but for some reason will not.

http://codepen.io/anon/pen/czxrq

17 Answers

You forgot to close the closing curly bracket for @-WebKit-keyframes rock-boat. Once I added that it puffed smoke just fine on codepen. I figured it out because CSS Lint noted the error.

i see my curly bracket though @-WebKit-keyframes rock-boat {

50% {-webkit-transform: rotate(-5deg) translateY(-10px); }

I count 2 opening curly brackets and only 1 closing curly bracket.

@-WebKit-keyframes rock-boat {

50% {-webkit-transform: rotate(-5deg) translateY(-10px); }

I see it now thanks!!

I have the same problem. The steam doesn't work, but the rock-boat works. Even the final doc in project folder doesn't work. I'm on Safari. When I try it in Firefox with -moz- vender prefix, the steam works but the rock-boat doesn't work!

I think the full page animation project is webkit (Chrome, Safari and recently Opera) only and doesn't support Firefox, is that right Guil Hernandez?

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

It is only for WebKit. But here's a new version using "Prefix Free." Now it should work in the the browsers: http://codepen.io/Guilh/pen/KiqkF

:+1: That's some very clean CSS

I am having the same issue with the steam (its not animating), however I am using chromium in ubuntu... could that be causing any conflict?

/* Animations - WebKit only ------------------------------------------ */

.boat { -webkit-animation: rock-boat 3s ease-in-out infinite;

} .boat:after{ -webkit-animation: steam 4s 2s infinite; } /* Keyframes - WebKit only ------------------------------------------ */

@-WebKit-keyframes rock-boat {

50%  {-webkit-transform: rotate(-5deg) translateY(-10px);
}

@WebKit-keyframes steam{
    40%,
    60% {opacity: 1;}
    100% {-webkit-transform: translate(-15%, -35%) rotateZ(20deg);}
}

/* Animations - WebKit only ------------------------------------------ */

.boat { -webkit-animation: rock-boat 3s ease-in-out infinite;

} .boat:after{ -webkit-animation: steam 4s 2s infinite; } /* Keyframes - WebKit only ------------------------------------------ */

@-WebKit-keyframes rock-boat {

50%  {-webkit-transform: rotate(-5deg) translateY(-10px);
}

@WebKit-keyframes steam{
    40%,
    60% {opacity: 1;}
    100% {-webkit-transform: translate(-15%, -35%) rotateZ(20deg);}
}

/* Animations - WebKit only ------------------------------------------ */

.boat { -webkit-animation: rock-boat 3s ease-in-out infinite;

} .boat:after{ -webkit-animation: steam 4s 2s infinite; } /* Keyframes - WebKit only ------------------------------------------ */

@-WebKit-keyframes rock-boat {

50%  {-webkit-transform: rotate(-5deg) translateY(-10px);
}

@WebKit-keyframes steam{
    40%,
    60% {opacity: 1;}
    100% {-webkit-transform: translate(-15%, -35%) rotateZ(20deg);}
}

Edit: code now there! ;)

Can you get the code in a codepen?

+1 for a codepen

/* Animations - WebKit only ------------------------------------------ */

.boat { -webkit-animation: rock-boat 3s ease-in-out infinite; } .boat::after { -webkit-animation: steam 4s 2s infinite; }

/* Keyframes - WebKit only ------------------------------------------ */

@-webkit-keyframes rock-boat { 50% { -webkit-transform: rotate(-5deg) translateY(-10px); } }

@-webkit-keyframes steam { 40%, 60% { opacity: 1; } 100% { -webkit-transform: translate(-15%, -35%) rotateZ(20deg); } }

for the boat after class I've tried both .boat:: after then .boat: after. neither are working.

Can you put the code in a codepen? Go to codepen.io and make a pen.

i copied the codepen into my sublime text and then saved it. works well. now trying to see what went wrong between the two codes

found it! for keyframe I put @webkit forgot the @-webkit

okay so still not working from mine. I've checked both from video and codepen. Its verbatim but no smoke coming out. though when copy and paste it works magically

You have link to the codepen so we can take a look at it.

Thank you Guil! This works perfect in Firefox, but Safari needs the prefix; still steam is not coming out. I kind of figured it out. It's the background image that doesn't work in Safari. When I put the stream image in index.html, it works! Thank you both, James and Guil!

Flora Karami - I think what Guil Hernandez meant by "prefix free" is that he used the prefix free JS script to handle the prefixes. To check on what actual prefixes you need for for which browser you will need to check out can I use.

I'm having trouble getting JUST the static images to load in the brower ANY browser. I load every project in with NO trouble. The paths are all correct so this ones a head scratcher...I'll reboot just in case..Still problematic...CORRECTION...The images wont load...Can't play with it without the images @(-1-)@

Guil Hernandez
Guil Hernandez
Treehouse Teacher

Hey Dave Cannon,

Can you please post your code here so we can take a look at what the issue might be? Thanks!

IT WORKS ON MY WINDOWS LAPTOP When time..read the below comments and inject a fix for Mac if possible...Thanks All !!

The code is the exact project files...This is not a question of code so much as the images aren't loading..I'm now at Project #2 with project files #2 and the steam.png is loading but i have little "thumbnails' where the mike and island.png shoud be. I It's the same on FF Chrome and Safari....WEIRD !! Not an issue I imagine anyone can resolve on your end but maybe :=) I'm putting the files into my htdocs folder like I do every project...ALL the other ones work...I AM doing this module on my Mac and will check now my Windows machine :-)

Can't get mike to "float"..i'd like him to bob up and down and I've been over this code till blurry...Here it is...Thanks in advance...

.boat {
    -webkit-animation: rock-boat 3s ease-in-out infinite;
}
.boat::after {
    -webkit-animation: steam 4s 2s infinite;
}
body {
    -webkit-animation: bg-move 8s ease-out forwards;
    }
.mike {
        -webkit-animation: mike-move 6s 2s ease-out forwards, 
                            mike-float 3.2s infinite;
}
/*  Keyframes - WebKit only
------------------------------------------ */

@-webkit-keyframes rock-boat {
    50%  { -webkit-transform: rotate(-5deg) translateY(-20px); }
}

@-webkit-keyframes steam {
    40%,
    60%  { opacity: 1; }
    100% { -webkit-transform: translate(-15%, -35%) rotateZ(20deg); }
}
@-webkit-keyframes bg-move {
    0% {background-position: 100% -560px;}
    100% {background-position: -350% -460px;}
}
@-webkit-keyframes mike-move {
        100% {left: 12%;}       
}
@webkit-keyframes mike-float {
            50% { -webkit-transform: rotateZ(5deg) translateY(-5px); }
}```
Guil Hernandez
Guil Hernandez
Treehouse Teacher

Hey Dave Cannon,

Looks like you're missing the first dash in your @-webkit-keyframes prefix.