Jump to content
Search Community

madwhiffery

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by madwhiffery

  1. I'm attempting to recreate a card-stacking effect except with gsap this time. I've successfully done what I wanted to do with css, but I've been having a problem expanding on the css. Let me explain- The effect I want to achieve is basically A set of frames each of which scrolls into view, freezes to enable a horizontal scrolling section, then shrinks to pin itself at the very top, like a set of stacked index cards. Getting position: sticky and scrollTrigger pin to play nice with each other seemed quite difficult so I'm now attempting to do the whole thing with scrollTrigger instead. You can look at the embedded codepen to see my current problem. I've tried to remove everything except some very minimal styling. You can look at an earlier prototype of the effect with position sticky, at this codepen link. Here it does everything except freeze and shift the content# container horizontally. So to sort of reiterate and hopefully clear it up again- its basically attempting to scroll to a section, freeze it in place and start a horizontal scroll, then shrink that section but still keep it pinned, and let the next section come in, rinse and repeat. Each section will have a slight offset from the top in order to achieve a kind of "stacked index cards" look. Not looking for a complete solution, any pointers to take me in the right direction or possibly what I'm doing wrong would be super super appreciated. I've gone through the common mistakes segment, and I'm just sort of stuck here right now. Thanks in advance! alternate link in case the current prototype codepen didn't embed
  2. @ZachSaucier Thanks a bunch, That helped a lot! I made that stackoverflow post, but I wanted to make sure that this transform issue was the problem. Sorry if I posted in the wrong place.
  3. I'm kind of a beginner in web development, so I'm not entirely sure if I'm on the right track here, but I've been trying to create cursor trails for some movable text. You can see the effect in the pen, and it seems to work. However I've been wanting to try and center the text to the cursor, which I just can't seem to do. Most video tutorials suggest using transform: translate(-50%,-50%), which seems to work for them, but not for me. I've attempted to do this moving text effect with jQuery and pure js, but that produces some really choppy animation- especially on chrome and safari. Gsap seems to consistently perform well across browsers, so I've been trying to get this to work. So I've been experimenting, and have found myself confused here- does x: e.clientX and y: e.clientY both animate using the translate3D css property? Is this overwriting transform: translate(-50%,-50%) ? Is there a simple way to fix this, or do I have to resort to figuring out some math on the js side of things? Thanks in advance.
×
×
  • Create New...