Jump to content


Pb in rotation of opening doors

Moderator Tag

Recommended Posts




I want to offer an effect of opening pannel just as in this codepen


Please note that I can't attach the images normally figuring the doors so I used red background.


Problem is the rotation is not keeping the normal aspect ratio of the 2 openning panels, they seem to be growing when opening.
Is there a way to improve this.



Moreover, I have another option wich would be to open sliding (not rotating) each element respectivelly to left and right. How to do it ?


Thanks you for help.



See the Pen NxqaJX by anon (@anon) on CodePen

Link to comment
Share on other sites

Hi C.Surieux :),


You can change the perspective of the doors by changing the transform perspective. You currently have it set to 800, but you can crank it up to your liking. Just change the last line of your CodePen to something like:

 CSSPlugin.defaultTransformPerspective = 2500;

Hopefully that looks better to you. :)

  • 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.