Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS3 keyframe animation not working in Firefox

Here is a small excerpt from my CSS3 animation. Works in Chrome, IE10 but not in FF. What did i miss here?

FIDDLE

http://jsfiddle.net/3k9VJ/

HTML

<div>
    <div class="pic u1"></div>
    <div class="pic u2"></div>
    <div class="pic u3"></div>
</div>

CSS

@-webkit-keyframes scrollem {
  0% {
    background-position-x: 0px;
  }

  100% {
    background-position-x: -2000000px;
  }
}

@-moz-keyframes scrollem {
 0% {
    background-position-x: 0px;
  }

  100% {
    background-position-x: -2000000px;
  }
}

@-ms-keyframes scrollem {
 0% {
    background-position-x: 0px;
  }

  100% {
    background-position-x: -2000000px;
  }
}

@keyframes scrollem {
 0% {
    background-position-x: 0px;
  }

  100% {
    background-position-x: -2000000px;
  }
}


.pic {
    width:100%;
    height:400px;
    position:absolute;
  background-repeat: repeat-x;  
    background-size: cover !important;  
    -webkit-animation-timing-function: linear;
    -webkit-animation-name: scrollem;
    -webkit-animation-iteration-count: infinite;    
    -webkit-animation-direction: normal;

    -moz-animation-timing-function: linear;
    -moz-animation-name: scrollem;
    -moz-animation-iteration-count: infinite;
    -moz-animation-direction: normal;       

    -ms-animation-timing-function: linear;
    -ms-animation-name: scrollem;
    -ms-animation-iteration-count: infinite;
    -ms-animation-direction: normal;    

    animation-timing-function: linear;
    animation-name: scrollem;
    animation-iteration-count: infinite;
    animation-direction: normal;    



}
.u1 {
    background: transparent url('http://i.telegraph.co.uk/multimedia/archive/02387/ufo_2387810b.jpg');
        -webkit-animation-duration: 100000s;
    -moz-animation-duration: 100000s;
    -ms-animation-duration: 100000s;
    animation-duration: 100000s;
}
.u2 {
    top:100px;
    background: transparent url('http://www.techi.com/wp-content/uploads/2012/11/UFO-4.jpg');
            -webkit-animation-duration: 200000s;
    -moz-animation-duration: 200000s;
    -ms-animation-duration: 200000s;
    animation-duration: 200000s;
}
.u3 {
    top:200px;
    background: transparent url('http://www.blisstree.com/wp-content/uploads/2013/07/UFO-EARTHLINGS.jpg') ;
        -webkit-animation-duration: 300000s;
    -moz-animation-duration: 300000s;
    -ms-animation-duration: 300000s;
    animation-duration: 300000s;    
}
like image 202
Mike Avatar asked Sep 18 '13 10:09

Mike


1 Answers

Firefox doesn't support background-position-x or background-position-y, that's why you cannot animate a single background axis on this browser.

like image 140
Fabrizio Calderan Avatar answered Nov 15 '22 03:11

Fabrizio Calderan