Jump to content
Search Community

Wewe

Members
  • Posts

    5
  • Joined

  • Last visited

Everything posted by Wewe

  1. import gsap from 'gsap'; import { ScrollTrigger } from 'gsap/ScrollTrigger'; gsap.registerPlugin( ScrollTrigger ); const theBody = theDoc.querySelector( 'body' ); const items = theDoc.querySelectorAll( '.container' ); const innerWindow = document.querySelector( 'iframe' )?.contentWindow; if ( ! items.length || ! innerWindow ) return; items.forEach( ( ele ) => { ScrollTrigger.create( { trigger: theBody, start: 'top top', scroller: innerWindow, onUpdate: ( self ) => { console.log( 'scroll' ); } }, } );
  2. that's pretty, many thanks
  3. Thanks for your help. I added the codepen to my topic, I used the <use> tag for my svg element, and is not working on safari.
  4. this.iconTL = gsap.timeline({repeat: -1}); this.flashItems.forEach(item => { this.iconTL.set(item, {display: 'block'}, '<').set(item, {display: 'none'}, '>.3'); })
  5. I want to set container pinned when it start from "top bottom", but the container fixed out of the view, How to set the top value to 0.
×
×
  • Create New...