Jump to content

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

Scroll Trigger: Two separate motions on a single SVG

Recommended Posts



I am having a problem in making motions with Scroll Trigger.


I am trying to make an SVG appear when triggered, and disappear after a few scrolls.


I tried making two separate timelines for each motion, which did not work at all... ,and I have also tried using .reverse( ) or .fromTo( ) with no avail.


Would any of you guys teach me how to make my SVG appear and later on disappear using the scroll trigger?


To get the precise image of what motion I am trying to make: 

I want this appearing and disappearing to be triggered through scrolling.


I am sorry, I cannot provide a codepen of my project (as I do not have the pro to upload the svg assets), instead I will clip a video of what I my current circumstance.

I am trying to make the forest kinda thing sink out of the view after another stroke of scrolls. 

Please help me out here.



Link to comment
Share on other sites

Hey @Keipen123,


Welcome to the GreenSock Forum.


This is an option to make someone pop up briefly and definitely go away again.


See the Pen abNZvxV by mikeK (@mikeK) on CodePen


Does that help?


Happy scrolling ...


  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Thank you very much for the replies and advices!


The "Just Do It......" example showed me well on how to make objects appear and disappear.


However, although I may sound very clamorous, as I implemented the code,

I felt that the disappearing motion, after the appearing motion, came a little too instantaneous.


I prefer there being some time lag between the appearing and the disappearing of the svg.

And to be much more demanding, I figured that I may want the svg to scale larger as it is gradually disappearing.


I am sorry it may be a turn down of the options @mikel provided me,

but is it possible to create a time lag between appearing and disappearing of a single svg, and also add certain things particularly on either of the motion? 



Link to comment
Share on other sites

Hey @Keipen123,


Time lag: change repeatDelay  - and play with the end figure e.g "+=2000"

Larger: you could scale the SVG or parts of it.


Although I don't want to see him for so long - he always puffs up like that, here's an example:


See the Pen rNeLjby by mikeK (@mikeK) on CodePen


Just test some alternatives ...



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