Jump to content
Search Community

Ozzy-U

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Ozzy-U

  1. Thank you for your answer. But the problem hasn't been solved.

     

    image.thumb.png.a10410e26c867e55dadb60660eb42096.png

     

    I mean, I want the pink div area 'start' and 'end' to go to the center of the pink div area. Like the image above.

     

    Is it right to write "top 30%" of the answer you gave me in the JavaScript area? Like the image below?
    (Sorry there is no codepen link.)

     

    image.png.7aa2a903ab4d405ddcb8beb5383a1b28.png

  2. image.png.423f3595249862f19d07bda7260d8e1d.png

     

    onMounted(() => {
      //fadeIn
      const fadeIn = gsap.utils.toArray(".fade-in")
      fadeIn.forEach((bg, i) => {
        console.log(bg)
        gsap.to(bg, {
          scrollTrigger: {
            trigger: bg,
            start: "top 40%",
            end: "top 20%",
            scrub: 3,
            markers: true,
          },
          opacity: 1,
        })
      })
    })

     

    The position of the scroll trigger markers in the onMounted can be adjusted using the 'start' and 'end' properties,

    but how do I adjust the 'start' and 'end' of the pink object on the left side of the image?

×
×
  • Create New...