1

The following is an earth globe that's rotating. Though this animation is working fine on Chrome, it doesn't work at all on Firefox, and it just stands still. Any help on how to solve this? JSFiddle.

<div id="page-wrapper">
        <div class="row">
                <div class="center-block img-responsive" id="earth"></div>
        </div>
    </div>



#earth {
    width: 100px;
    height: 100px;
    background: url('../images/Earth-Color.jpg');
    border-radius: 50%;
    background-size: 210px;
    box-shadow: inset 16px 0 40px 6px rgb(0, 0, 0),
        inset -3px 0 6px 2px rgba(255, 255, 255, 0.2);
    animation-name: rotate;
    animation-duration: 4s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    margin-top:200px;
}


@keyframes rotate {
  from { background-position-x: 0px; }
  to { background-position-x: 210px; }
}
mikeb
  • 709
  • 2
  • 9
  • 35

1 Answers1

3

You need to set the background-position property as a whole in @keyframes

@keyframes rotate {
    from { background-position: 0px 0; }
    to { background-position: 210px 0; }
}

jsFiddle

background-position-x and background-position-y are not yet implemented in FireFox. But it seems like they will be added in future.

Another SO question on this

Community
  • 1
  • 1
Saranga A
  • 1,091
  • 16
  • 22