Jump to content
Search Community

cobalt

Premium
  • Posts

    1
  • Joined

  • Last visited

Posts posted by cobalt

  1. On 4/14/2021 at 11:34 AM, Bekah said:

    In case anyone else comes across this like I did, having trouble with GSAP animating from one clip-path to another: make sure both clip-paths are using the same units, including any zero values. 

     

    For example, trying to animate from this:

    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); 

    to this:

    clip-path: polygon(-100% 0, -100% 0, -100% 100%, -100% 100%)

    wasn't working, but when I changed the zero values to percentages, it worked perfectly.

     

    // From
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)
    
    // To
    clip-path: polygon(-100% 0%, -100% 0%, -100% 100%, -100% 100%)

     

    Fantastic answer ! I was facing an issue when animating with cilp path where i get no transition. It was because of my 0 values not having a unit, added a % sign to all my 0 values made it work !! Thank you !

    • Like 1
×
×
  • Create New...