Jump to content
Search Community

SVG path pixels bug

thisGuh test
Moderator Tag

Recommended Posts

Hi @thisGuh,

 

You're in two different 'worlds' here.

You're moving the text 300px - but the car is in an SVG, so it's moving 300 SVG units.

You could do some maths to get the equivalent of 300px but that's possibly a bit too complex, if you're just trying to move the car a bit more you can just use a higher value! 

I quite like using xPercent and yPercent in SVG because it's easier to quantify how far something's going to move. They move the element relative to its own width/height - xPercent:100 will move the element right by exactly it's own width.  

See the Pen eYEeepO?editors=1010 by GreenSock (@GreenSock) on CodePen



If this doesn't work and you *need* pixels - let me know.

  • Like 2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...