Jump to content
Search Community

Trapti last won the day on September 7 2023

Trapti had the most liked content!

Trapti

Members
  • Posts

    174
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Trapti

  1. gsap.to(header,{
      scrollTrigger:{ 
        trigger: ".dark",
        start: "top 80%",
        end: "bottom 20",
        toggleActions: "play reverse play reverse",
       markers: true,
        toggleClass: "dark-mode"
        },
      // '-webkit-filter':'invert(100%)',
      //   filter: 'invert(100%)'
      
    });

    You need to use it this way. It is a Syntax issue.

  2. I am assuming you want to change the color of the header based on the section which is in viewport. As the section changes on scroll, header color should also change. 

     This codepen will be helpful. 

    See the Pen BadYrrY by tripti1410 (@tripti1410) on CodePen

     

    if this is not the problem you are trying to solve, then please describe better what you are trying to achieve with this. 

    • Like 1
  3. The code is working fine as I said. 

    tl.to("#scrolling-text-1", { y: "-50%", opacity: 0 }).fromTo(
      "#scrolling-text-2",
      { y: "0%", opacity: 0 }, {opacity: 1, color: "red"}
    );

    This is code snippet of your pen. I just added color: red. that animates means it's working. Also, y: 0 is not doing anything and it just changing the opacity. 

    • Like 3
  4. Hi, 

    I changed the approach to this animation. Check pen. Created a single timeline for all the text animation and triggered it for ".hero" section. I felt having scrolltrigger for all the texts is way too much. Change the duration and the stagger value if it is required. Also setting grey color for text on CSS and changing to black with JS is not great idea. If JS does not load than text will look faded and will not be readable for some users. 

    See the Pen LYMLVZM by tripti1410 (@tripti1410) on CodePen

     

     

    Here is with splitText plugin. Spliting text manually just for animation is not great. 

    See the Pen MWZoamx by tripti1410 (@tripti1410) on CodePen

    Hope it helps!
     

    • Like 2
  5. Hi, There is a scrollTrigger attach for each quote so the animation starts at the trigger point. You can include markers and check. 

     

    If you want these to animate at specific durations and in one after the other in a flow, then do not use scroll trigger and use position parameters. Here is a pen for the same without scrollTrigger.

    See the Pen qBLmKNg?editors=1010 by tripti1410 (@tripti1410) on CodePen



    Hope it helps!

    • Like 2
  6. Hi, 

     

    My approach would be to play with the start value of the motion path. Like for the first time, start value should be 0. And next round onwards may 0.3-0.4 whichever value is suitable for text to begin with circle start.  


    I haven't tried something like this before so not sure whether this will work. 
    Hope it helps. 

    • Like 1
×
×
  • Create New...