nenad.s Posted May 29, 2022 Share Posted May 29, 2022 Hi guys, short and sweet: How do I make a tween use relative units instead of px? In a set of chained tweens, I'd like one to use 50vw for the 'y' transform: .to(".target", { y: 50vh} ) Still a noobie, can't find anything yet in the docs. Link to comment Share on other sites More sharing options...
PointC Posted May 30, 2022 Share Posted May 30, 2022 Those units will work just fine. See the Pen 591f1e23d6ae012278e23460ab4cedc8 by PointC (@PointC) on CodePen When in doubt, give it a whirl. Happy tweening. 1 Link to comment Share on other sites More sharing options...
nenad.s Posted May 30, 2022 Author Share Posted May 30, 2022 Ah, the bloody braces... Thank you It's a good thing to have a forum when brains aren't operating at full capacity 1 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now