Jump to content
GreenSock

goodcontext

I use scrollTrigger, and I can't see the image.

Go to solution Solved by OSUblake,

Recommended Posts

Sometimes you can see an image, sometimes you can't.

You can see it well on the code pen.

But local or github.io I can't see it. There are times when you can see it.

Even if I try this and that, it doesn't work. How can I fix this?

It often works well in chrome.
However, I think there are more times when you can't see it from the edge.

bug_report.zip

See the Pen eYeJEBv by goodcontext (@goodcontext) on CodePen

Link to comment
Share on other sites

I think your issue is that you're nesting two scroll triggers in a single timeline. You should just be able to use a gsap.from(...) for each one.

  • Like 1
Link to comment
Share on other sites

  • Solution

You should probably refresh ScrollTrigger when your images have loaded.

 

window.addEventListener("load", () => {
  ScrollTrigger.refresh()
});

 

  • Like 1
Link to comment
Share on other sites

1 hour ago, OSUblake said:

You should probably refresh ScrollTrigger when your images have loaded.

 

window.addEventListener("load", () => {
  ScrollTrigger.refresh()
});

 

See the Pen vYWLdvX by goodcontext (@goodcontext) on CodePen

 

Thank you both so much.
I fixed the code and it works perfectly.
Thank you.

result_code.zip

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