Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
mechaniac

SVG perspective

Recommended Posts

I would like to rotate an SVG element (imageContainer in my example) so it has a faked perspective.

is this possible with GSAP?

 

I tried rotate and setting perspective. Does this only work for html elements but not inside an SVG?

 

(I am fairly new to this, so any help, pointing me in the right direction or to the right documentation would be very much appreciated)

 

svg_rotate.jpg

See the Pen eYOVeZK by mechaniac (@mechaniac) on CodePen

Share this post


Link to post
Share on other sites

Hi @mechaniac :)

 

Welcome to the forum and thanks for joining Club GreenSock.

 

That's a limitation of SVG for now.(SVG 2 may be different) You can't rotate those child elements in 3D space, but you can rotate the entire SVG.

See the Pen oNvEExq by PointC (@PointC) on CodePen

 

Hopefully that helps. Happy tweening and welcome aboard.

:)

 

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×