I’m trying to use a 2D transform on my website project to make an image move from off-screen on the left side to a place onscreen. I have tried everything I’ve read on W3 Schools and MDN Web Docs but nothing has worked. The image has remained completely static no matter what I do, and the transform doesn’t play.
Here is my code:
`.authorimage {
width: 33%;
padding: 2rem;
transition: transform 3s;
transform: translateX(-45rem);
}`
Oddly, the only time the transform play is when I go into my web browser’s inspect and unclick/click the CSS code for “transform: translateX(-45rem);” Then and only then does the transform do what it is supposed to do via W3 Schools. I’ve also consulted and altered my code many times via MDN Web Docs and nothing has worked. Can anyone help?
kurosawaftw7 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.