+ 1
Why does ease-in and ease-out not work?
Go on javascript https://code.sololearn.com/W8n1MG3ea9QR/?ref=app
7 Réponses
+ 4
The transition statement is "easy-out" not "eas-out" and "easy-in" not ="eas-in".
+ 1
window.onload=()=>{
var bottom=40.5;
function jump() {
bottom=60;
// HERE
document.getElementById("player").style.transitionTimingFunction="easy-out";
document.getElementById("player").style.bottom=bottom+"%";
setTimeout(back, 700)
}
function back() {
bottom=40.5;
// AND HERE
document.getElementById("player").style.transitionTimingFunction="easy-in";
document.getElementById("player").style.bottom=bottom+"%";
}
jump()
}
+ 1
This is the corrected code and works.
+ 1
Just replace your code with my.
0
Why did you just copy my code?
0
Not for me then. Maybe on phones it doesn't?
0
Oh yes! Thanks!