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;
}
Firefox doesn't support background-position-x
or background-position-y
, that's why you cannot animate a single background axis on this browser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With