How to configure the css of keyframes for Firefox?

Asked

Viewed 35 times

0

Good Afternoon

My question concerns the configuration of keysframes for the Mozilla Firefox browser

In Chrome browser I used the following setting :

 #unidade-movel {
    position: absolute;
    left: 100%;
    top: 97px;
	  -webkit-animation: unidade-movel 10s infinite ;
		animation: unidade-movel 10s infinite;
}

@-webkit-keyframes  unidade-movel {
0% {
    top: 20px;
    left: 0%;
}

10% {
    top: 20px;
    left: 10%;
}
20% {
    top: 20px;
    left: 20%;
}
30% {
    top: 20px;
    left: 30%;
}
40% {
    top: 20px;
    left: 40%;
}
45% {
    top: 130px;
    left: 45%;
}
50% {
    top: 150px;
    left: 40%;
}
60% {
    top: 150px;
    left: 25%;
}
70% {
    top: 180px;
    left: 20%;
}
80% {
    top: 205px;
    left: 20%;
}
90% {
    top: 280px;
    left: 20%;
}
100% {
    top: 280px;
    left: 100%;
}
}

For Mozilla firefox I used the following configuration:

@keyframes unidade-movel {
0% {
    top: 20px;
    left: 0%;
}

10% {
    top: 20px;
    left: 10%;
}
20% {
    top: 20px;
    left: 20%;
}
30% {
    top: 20px;
    left: 30%;
}
40% {
    top: 20px;
    left: 40%;
}
45% {
    top: 130px;
    left: 45%;
}
50% {
    top: 150px;
    left: 40%;
}
60% {
    top: 150px;
    left: 25%;
}
70% {
    top: 180px;
    left: 20%;
}
80% {
    top: 205px;
    left: 20%;
}
90% {
    top: 280px;
    left: 20%;
}
100% {
    top: 280px;
    left: 100%;
}
}

The problem found is this, in Mozilla firefox the animation is at the top of the site when the correct is to stay in the middle and when I inspect the element I cannot reposition the element using css, I believe that the configuration for Mozilla is not correct, in some researches I did was directed to put a -Moz-keyframe or -Moz-Animation I did in the code but also did not have effect in other researches I was directed to remove the -Moz- but without success! I would like some guidance, thank you in advance!

  • I recommend reading: https://answall.com/questions/3674

  • Directly related to animation and to the keyframe, was not to have differences. From the version 16 of Firefox and 43 of Chrome, both the animation as to the keyframe have been fully compatibilized. There is no need* for the browser prefix. Your problem is probably related to other elements of your code. So it would be better if you [Dit] your question and post some more codes that are directly related to this problem. Comp. keyframe and Comp. Animation.

  • 1

    Cara tested his animation in both Chrome and FF and in both browser he renders the animation at the top of the page... To inspect the animation and debug you can see some details in this question, sometimes help you https://answall.com/questions/347470/existe-alguma-forma-de-testar-uma-anima%C3%A7%C3%A3o-css-by-devtools but if possible put the complete code there, without it

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.