Jump to content
Search Community

Image Comparision on Scroll overlaps the sections

orca_rohit test
Moderator Tag

Go to solution Solved by orca_rohit,

Recommended Posts

  • Solution

hi I saw an example of image comparision in gsap docs. I liked it and thought to customize it on my own way.

Though i was able to customize it in my own idea, I noticed that the elements are overlapping the sections and the animation is starting very early than it should.

Kindly help.

 

Sorry Guys it was just a css issue, but still i would like your opinions if this bit i got properly.

See the Pen zYoMJNa by orca_rohit (@orca_rohit) on CodePen

Edited by orca_rohit
Tweaked to achive the required solution
Link to comment
Share on other sites

 

Hey @orca_rohit

 

I'm not sure I understand, but I don't think it starts earlier than it should.

To me it looks like more of a CSS layout question.

 

Since you did not specify a height on your sections before the image-comparison but only a min-height, that is what your sections will be set to.

To me the ScrollTrigger part looks like it's doing what it is supposed to.

 

But maybe I am misunderstanding?

 

 

  • Like 1
Link to comment
Share on other sites

8 minutes ago, akapowl said:

 

Hey @orca_rohit

 

I'm not sure I understand, but I don't think it starts earlier than it should.

To me it looks like more of a CSS layout question.

 

Since you did not specify a height on your sections before the image-comparison but only a min-height, that is what your sections will be set to.

To me the ScrollTrigger part looks like it's doing what it is supposed to.

 

But maybe I am misunderstanding?

 

 

@akapowl when I posted this I didn't checked my css file. but after a while i got that it was happening due to css. so I changed the css and marked that codepen as a solution.

 

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