5

これは私の CSS3 アニメーションからの小さな抜粋です。Chrome、IE10 では動作しますが、FF では動作しません。私はここで何を逃したのですか?

フィドル

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;    
}
4

2 に答える 2

5

Firefox はbackground-position-xまたはbackground-position-yをサポートしていません。そのため、このブラウザでは単一の背景軸をアニメーション化できません。

于 2013-09-18T11:03:27.583 に答える