Skip to content Skip to sidebar Skip to footer

Css Flipping Animation Not Working

using CSS3 perspective, I would like to make a flipping animation. Here is my code: HTML:

Title

Solution 1:

I added some prefixes. Please check this fiddle.

Fiddle

CSS

headerdiv#h1h1{
    position: absolute;
    -webkit-animation: flip 5s infinite; /* Safari 4+ */
    -moz-animation:    flip 5s infinite; /* Fx 5+ */
    -o-animation:      flip 5s infinite; /* Opera 12+ */animation:         flip 5s infinite; /* IE 10+ */
}

Solution 2:

Just a demo example http://jsfiddle.net/6zF4X/2/

It wasn't flipping all the way since your last value was 180deg instead of 360deg. I adjusted some of the other deg's, but you should adjust the degrees the way you want. Just make sure the first one is 0 and the last is 360. Also, it's best practice to use the same value types throughout the animation. So I used rotateX(0) for the 0% instead of rotate(0) like you had before.

I changed some other stuff around in the fiddle, so don't use that fiddle exactly. Just change your rotate deg's accoringly and it will work.

@keyframes flip{
    0%{
        transform: rotateX(0);
    }
    25%{
        transform: rotateX(80deg);
    }
    50%{
        transform: rotateX(160deg);
    }
    75%{
        transform: rotateX(280deg);
    }
    100%{
        transform: rotateX(360deg);
    }
}

Post a Comment for "Css Flipping Animation Not Working"