sactw
sactw

Reputation: 35

CSS keyframes only works in Chrome

i'm trying to make a simple animation using keyframes, but it only works in Chrome. Here is the code (i've only included keyframes code once, for shorter post):

@keyframes logokf {
    0% {
    background-image: url('gfx/logo1.png');
    }    
    20% {
    background-image: url('gfx/logo2.png');
    }    
    40% {
    background-image: url('gfx/logo3.png');
    }    
    60% {
    background-image: url('gfx/logo4.png');
    }    
    80% {
    background-image: url('gfx/logo1.png');
    }    
    100% {
    background-image: url('gfx/logo1.png');
    }

}


@-webkit-keyframes logokf {    
}

@-moz-keyframes logokf {             
}

@-o-keyframes logokf { 
}

@-ms-keyframes logokf {
}

#logo:hover {
float: left;
height: 75px;
margin: 28px 0 22px;
width: 276px;

/*animation-name*/
-webkit-animation-name:logokf;
-moz-animation-name:logokf;
-ms-animation-name:logokf;
-o-animation-name:logokf;
animation-name:logokf;

/*animation-duration*/
-webkit-animation-duration:1s;
-moz-animation-duration:1s;
-ms-animation-duration:1s;
-o-animation-duration:1s;
animation-duration:1s;

/*animation-iteration-count*/
-webkit-animation-iteration-count:infinite;
-moz-animation-iteration-count:infinite;
-ms-animation-iteration-count:infinite;
-o-animation-iteration-count:infinite;
animation-iteration-count:infinite;

/*animation-timing-function*/
-webkit-animation-timing-function:lineare;
-moz-animation-timing-function:lineare;
-ms-animation-timing-function:lineare;
-o-animation-timing-function:lineare;
animation-timing-function:lineare;

/*animation-delay*/
-webkit-animation-delay:0s;
-moz-animation-delay:0s;
-ms-animation-delay:0s;
-o-animation-delay:0s;
animation-delay:0s;

 }

Any thoughts of how can i fix it or keyframes are not yet supported from other browsers?

Upvotes: 2

Views: 1347

Answers (1)

Michael Mullany
Michael Mullany

Reputation: 31705

background-image itself does not appear to be a valid transitionable property. It may happen to work in Chrome, but it's probably just lucky. When it's implemented, you'll be looking to use the crossfade capability in CSS images.

Upvotes: 2

Related Questions