I have a div that starts off the screen due to this CSS code:
transform: translateX(100%);
Now, I am looking to bring this div back into view by a specific distance from the right side. Although I have tried using transform: translateX(-450px)
, it seems to be translating based on the viewport's origin point (x,y) = (0,0). What I actually want is for the div to move 450px into the viewport from the right side of the screen.
Put simply, I want my translate origin to be at (x,y)=(100%,0%)
.
Is there a way to achieve this effect?