Jump to content
Search Community

Diagonal Div Page transition

celli test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I have a crude example in my codePen of a diagonal div that I am trying to cover the entire window, and when I click the button the diagonal shape will slide down to the bottom left of the window, and reveal the content underneath.

 

I am sure there is a much better way to approach this, so the diagonal is not a huge shape stretching way beyond the borders of the browser and so that it looks like a diagonal triangle shape, as it slides down to the left and out of view at any screen size. Can someone shed some light...?

See the Pen RNNvQW by celli (@celli) on CodePen

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