Jump to content
Search Community

ScrollTrigger Zoom in Effect - Smooth Scroll Problem

Sukru test
Moderator Tag

Recommended Posts

19 hours ago, OSUblake said:

Hi Sukru,

 

You weren't passing in the correct element to the smoothScroll function, and I'm not sure why at the moment, but you need to use scrub: true.

 

 

 

Thank you OSUblake :)

So how can i position it in the middle of the page so it determines the styles itself, i can't interfere with css

Web 1920 – 1.jpg

Link to comment
Share on other sites

You can center stuff like this, but it's not going to be correct vertically because of how your HTML is structured. You'd at least need a wrapper around that element that is 100vh and then pin that.

 

gsap.set("#intro", {
  top: "50%",
  left: "50%",
  xPercent: -50,
  yPercent: -50,
});

 

Link to comment
Share on other sites

55 minutes ago, OSUblake said:

You can center stuff like this, but it's not going to be correct vertically because of how your HTML is structured. You'd at least need a wrapper around that element that is 100vh and then pin that.

 

gsap.set("#intro", {
  top: "50%",
  left: "50%",
  xPercent: -50,
  yPercent: -50,
});

 

i try but not fully centered object overflowed below I made 100vh

See the Pen ExbObXq by sukruemanet (@sukruemanet) on CodePen

2022-03-01 212042.jpg

Link to comment
Share on other sites

I see it on every device I've tried. Maybe the image isn't loading on your network. 🤷‍♂️

 

There is a warning in the dev console.

 

Quote

Mixed Content: The page at 'https://cdpn.io/GreenSock/fullpage/NWwEXYQ' was loaded over HTTPS, but requested an insecure element 'http://theinfosphere.org/images/thumb/9/9e/Audience.png/900px-Audience.png'. This request was automatically upgraded to HTTPS, For more information see https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html

 

Link to comment
Share on other sites

1 hour ago, OSUblake said:

Denediğim her cihazda görüyorum. Belki resim ağınızda yüklenmiyor. 🤷‍♂️

 

Geliştirici konsolunda bir uyarı var.

 

 

i cant see it in codepen link :(

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