-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can motionpath add a unit conversion? #611
Comments
But I see that when gsap is converted into translate3d attribute, it is px |
@DanielLin0516 can you please provide a minimal demo, like a CodePen, that clearly illustrates the problem you're trying to solve? |
Sorry, I don't have but when i use svg html element ,giving it the appropriate size and the curve path is adaptive to mobile phones |
It's very difficult to help you without a minimal demo that clearly illustrates the issue. I don't think what you're asking for is necessary or even possible due to many reasons. If you need a responsive path, there are many other ways to do it. Again, if you'd like more assistance, please provide a minimal demo as a CodePen. For example, here's one that uses MotionPath that you can just fork: https://codepen.io/cassie-codes/pen/mdddaRG?editors=0010 Often it's just a matter of making your SVG responsive, and then set up a debounced "resize" handler that then re-creates your animation based on the new size. gsap.context() might make it very easy for you. |
The unit I need is rem
The text was updated successfully, but these errors were encountered: