Jump to content
Search Community

IndM

Members
  • Posts

    61
  • Joined

  • Last visited

Community Answers

  1. IndM's post in How do i scale on the x-axis without losing content aspect-ratio was marked as the answer   
    Hi there @thetobiterra!

    The thing is that you have to use max width to animate. This way in combination with object-fit it would always center the image/ video. If you use scale it would expand all the items and won't give you the effect you want.

    Is this something you're looking for?


    See the Pen OJrxEYP by indy-meermans (@indy-meermans) on CodePen
  2. IndM's post in Sticky header gives wrong height when already scrolled was marked as the answer   
    For everyone who experience the same issue:
    Gsap needs to be executed only when everything is loaded. Otherwise the calculations are way off.

    I fixed it in this case with wrapping the code around my gsap code so it will be executed when the dom is fully loaded. 

     
    document.onreadystatechange = () => { if (document.readyState === 'complete') { // Gsap code here } }  
×
×
  • Create New...