css - Transform/translate errors that occur exclusively in Mozilla -


i've issue transform/translation glitches within animation. errors occur exclusively within mozilla, obviously, functioning in chrome. realize repeated issue, first did research @ css3 , mdn, reviewed these questions, , ensured functionality of transform here. in tow, remain confused.

body {    overflow: hidden;    background: #e8e8e8;  }    .floor {    height: 90px;    width: 450px;    border-bottom: 1px solid #e8e8e8;    position: absolute;    top: 50%;    left: 50%;    margin-top: -50px;    margin-left: -250px;  }    .box {    box-sizing: border-box;    width: 90px;    height: 90px;    border-radius: 2px;    background: #d0d0d0;      -webkit-transform-origin: 100% 100%;      -moz-transform-origin: 100% 100%;      -o-transform-origin: 100% 100%;      transform-origin: 100% 100%;      -webkit-animation: turnmove 3500ms infinite alternate cubic-bezier(0.75, 0, 0.175, 1);      -moz-animation: turnmove 3500ms infinite alternate cubic-bezier(0.75, 0, 0.175, 1);      -o-animation: turnmove 3500ms infinite alternate cubic-bezier(0.75, 0, 0.175, 1);      animation: turnmove 3500ms infinite alternate cubic-bezier(0.75, 0, 0.175, 1);      animation-play-state: play;      animation-delay: 0ms;  }    @keyframes turnmove {    0% {      transform: translate(0, 0) rotate(0turn);      transform-origin: 100% 100%;    }    25% {      transform: translate(0, 0) rotate(0.25turn);      transform-origin: 100% 100%;      animation-timing-function: step-end;      background: #b9b9b9;    }    25.01% {      transform: translate(90px, 90px) rotate(0.25turn);      transform-origin: 100% 0;      background: #b9b9b9;    }    50% {      transform: translate(90px, 90px) rotate(0.5turn);      transform-origin: 100% 0;      animation-timing-function: step-end;      background: #a2a2a2;    }    50.01% {      transform: translate(270px, 90px) rotate(0.5turn);      transform-origin: 0 0;      background: #a2a2a2;    }    75% {      transform: translate(270px, 90px) rotate(0.75turn);      transform-origin: 0 0;      animation-timing-function: step-end;      background: #8b8b8b;    }    75.01% {      transform: translate(360px, 0) rotate(0.75turn);      transform-origin: 0 100%;      background: #8b8b8b;    }    100% {      transform: translate(360px, 0) rotate(1turn);      transform-origin: 0 100%;      background: #747474;    }  }    @-webkit-keyframes turnmove {    0% {      transform: translate(0, 0) rotate(0turn);      transform-origin: 100% 100%;    }    25% {      transform: translate(0, 0) rotate(0.25turn);      transform-origin: 100% 100%;      animation-timing-function: step-end;      background: #b9b9b9;    }    25.01% {      transform: translate(90px, 90px) rotate(0.25turn);      transform-origin: 100% 0;      background: #b9b9b9;    }    50% {      transform: translate(90px, 90px) rotate(0.5turn);      transform-origin: 100% 0;      animation-timing-function: step-end;      background: #a2a2a2;    }    50.01% {      transform: translate(270px, 90px) rotate(0.5turn);      transform-origin: 0 0;      background: #a2a2a2;    }    75% {      transform: translate(270px, 90px) rotate(0.75turn);      transform-origin: 0 0;      animation-timing-function: step-end;      background: #8b8b8b;    }    75.01% {      transform: translate(360px, 0) rotate(0.75turn);      transform-origin: 0 100%;      background: #8b8b8b;    }    100% {      transform: translate(360px, 0) rotate(1turn);      transform-origin: 0 100%;      background: #747474;    }  }    @-moz-keyframes turnmove {    0% {      transform: translate(0, 0) rotate(0turn);      transform-origin: 100% 100%;    }    25% {      transform: translate(0, 0) rotate(0.25turn);      transform-origin: 100% 100%;      animation-timing-function: step-end;      background: #b9b9b9;    }    25.01% {      transform: translate(90px, 90px) rotate(0.25turn);      transform-origin: 100% 0;      background: #b9b9b9;    }    50% {      transform: translate(90px, 90px) rotate(0.5turn);      transform-origin: 100% 0;      animation-timing-function: step-end;      background: #a2a2a2;    }    50.01% {      transform: translate(270px, 90px) rotate(0.5turn);      transform-origin: 0 0;      background: #a2a2a2;    }    75% {      transform: translate(270px, 90px) rotate(0.75turn);      transform-origin: 0 0;      animation-timing-function: step-end;      background: #8b8b8b;    }    75.01% {      transform: translate(360px, 0) rotate(0.75turn);      transform-origin: 0 100%;      background: #8b8b8b;    }    100% {      transform: translate(360px, 0) rotate(1turn);      transform-origin: 0 100%;      background: #747474;    }  }
<div class="floor">      <div class="box"></div>  </div>

here codepen.

as can see (and far knowledge can allow), i've included -moz- prefix before keyframes , transformations necessary (if necessary). however, each translation/turn of box, box first translate great distance intended location, return, resume animation until repeats error on next translation/turn. appears rapid glitch, visible frame or two.

i thought @ first may due how parsed percentages of keyframes, or perhaps miscommunication of utilized transform short-hand, but, after testing, still cannot sure. i've not found alteration of code might alter error or smooth @ step.

as animation plays smoothly in chrome, in mozilla. assistance on matter appreciated.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo