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

Animation now fading up

Hello everyone. I am currently working on my css3 animation,but for some reason my animation is not fading up.Is there anything that I am doing wrong here?

 <h1 class="fadingUp">Welcome</h1>
-webkit-@keyframes fade-up {

       from{
           opacity:0;
           transform:translateY(50px) scale(1.2);
       }

      to {
        opacity:1;
        transform:translateY(0) scale(1);
      }
}
 .fadingUp{
     animation-name:fade-up;
     animation-duration:1s;
     animation-fill-mode:forwards;
     position: relative;
     font-weight:normal;
     opacity:0;
}

4 Answers

There is a typo in the CSS

change:

-webkit-@keyframes fade-up

with this:

@-webkit-keyframes fade-up {

I changed it ,but my animation is not working for my website. The text is not showing on the screen. I can't even see it. I took out the opacity and now I can see the text but not the animation.

I tested it and it works (look at this in codepen)

@-webkit-keyframes fade-up {

       from{
           opacity:0;
           transform:translateY(50px) scale(1.2);
       }

      to {
        opacity:1;
        transform:translateY(0) scale(1);
      }
}
 .fadingUp{
     animation-name:fade-up;
     animation-duration:1s;
     animation-fill-mode:forwards;
     position: relative;
     font-weight:normal;
     opacity:0;
}

Ok, I saw it and it working. I don't why is not working in chrome or firefox. Thank you .