Jump to content
Search Community

Help me to fullfilled my requirment

Sanju Antala test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

  • Solution

Hi @Sanju Antala welcome to the forum! 

 

You could do this in several ways, but the easiest in my opinion is with a clipPath. I've used https://bennettfeely.com/clippy/ to generate two clipPath's and then use GSAP to tween between them. You have to make sure that the in and out put of the string you use in GSAP is the same as your CSS. I like to just put a % after each number (sometimes https://bennettfeely.com/clippy/ doesn't do that) 

 

See the Pen MWqxwOZ?editors=1010 by mvaneijgen (@mvaneijgen) on CodePen

 

And if you want things to happen on scroll! Use ScrollTrigger! (ScrollTrigger docs) While starting with an animation it is beter to remove ScrollTrigger! This seems counter intuitive, but ScrollTrigger is just animating something on scroll, so just focus on the animation at first and only when you're happy with the animation add ScrollTrigger back in.

 

See the Pen dyqroWY?editors=1010 by mvaneijgen (@mvaneijgen) on CodePen

  • Like 3
  • Thanks 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...