Jump to content
Search Community

R.Sp anim

Lillian.S test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

  • Solution

Hi @Lillian.S. GSAP can animate clipPath, but I don't think that's really what you want here because of the way you've got your CSS set up with the background-size set to cover and a set width/height. I suspect it'd be easier and more performant to wrap it in a container with a border-radius, animate the skewY of that, but counter-animate the skewY of the element in the opposite direction simultaneously. But you've gotta scale that inner <div> so that its edges extend far enough to cover the area you're exposing with the skew: 

See the Pen abaEgyy by GreenSock (@GreenSock) on CodePen

 

I hope that gets you going in the right direction. Happy tweening!

  • Like 2
Link to comment
Share on other sites

On 3/12/2023 at 2:22 AM, GreenSock said:

Hi @Lillian.S. GSAP can animate clipPath, but I don't think that's really what you want here because of the way you've got your CSS set up with the background-size set to cover and a set width/height. I suspect it'd be easier and more performant to wrap it in a container with a border-radius, animate the skewY of that, but counter-animate the skewY of the element in the opposite direction simultaneously. But you've gotta scale that inner <div> so that its edges extend far enough to cover the area you're exposing with the skew: 

 

 

 

I hope that gets you going in the right direction. Happy tweening!
 

Thanks for helping me as well, you made my day :)

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