Answer the question
In order to leave comments, you need to log in
How to change the value of transform-translate?
Help, I can’t figure out how to change the transform-translate property
I want to move the model using this property
now I’m doing this, but how to do it with transforms
I’m trying to do this, but it doesn’t work
player.style.top = player.offsetTop + 30 + 'px'
player.style.transform = "translateX(" + (5) + "px)";
Answer the question
In order to leave comments, you need to log in
In styles, transformations are set through variables, and in scripts, these variables are changed elem.style.setProperty()
. You can try elem.style = `transform: translate( ${x}, ${y});`
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question